0
Why are some parameters in quotation brackets?
function sayHello(name, age) { document.write( name + " is " + age + " years old."); } sayHello("John", 20) //Outputs "John is 20 years old." why is john in "
4 Respuestas
+ 7
Because John is a string.
+ 7
It will be hilarious if someone named John came in and go like "Hey, I'm not a string."
+ 1
"John" is a string
John would be a variable
20 is integer
"20" is string
:)
Hope this helps, even a bit.
0
Thanks for the help guys :D