What does the `length` property return for the string ‘Hello’?

JavaScript Associate Easy

JavaScript Associate — Easy

What does the `length` property return for the string ‘Hello’?

Key points

  • The `length` property counts characters in a string
  • 'Hello' has 5 characters
  • The space between 'Hello' is also counted
  • The `length` property is a built-in property in JavaScript

Ready to go further?

Related questions