why The expression ‘hi!’.length will be evaluated to 3 and that will be printed to the console
What is the outcome of this statement, question that i got, and i got the answer but didn`t got the reason why
What are you asking exactly?
i have taken a test/quiz and one of the questions was what is the outcome of this statement console.log(‘hi!’.length)
and the answer was console.log(‘hi!’.length) will be evaluated to 3 and that will be printed to the console.
im asking why
hi!.length is = 3, and that will be printed to the console.
"hi!.length is calling
hi!. When you do that it finds out how many characters (in this case) there are.
thank you! it helped me a lot have a great day
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.