length

var welcome = "Hello"
strLength = welcome.length

Note:
In this example the variable strLength will contain the number 5. Please note when using length, you should not append length with round brackets.

Close