What is wrong?


#1

var myCountry = String ;
console.log( myCountry.length);
console.log("myCountry".substring(0,3));


#2

okay, we have strings, which are wrapped in quotation marks ("):

"i am a string"

we can log a string to the console using console.log():

console.log("i am logged to the console")

now, we can also store strings in variables:

myVar = "i am a string"

now you log the string to the console using the variable name:

console.log(myVar)

you can call length and substring on the variable (variable don't have quotation marks)

Hope this helps


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.