Can not make a string variable


#1


Lesson 26 of Getting started


It just reads the code myName instead of Renz


Replace this line with your code. 
// On line 2, declare a variable myName and give it your name.
var myName = "Renz";
// On line 4, use console.log to print out the myName variable.
console.log("myName");
// On line 7, change the value of myName to be just the first 2 
// letters of your name.
console.log("myName".substring(0,2));
// On line 9, use console.log to print out the myName variable.
console.log("myName");


#2

So I just finished the first module by replacing all console.log("myName") to console.log("Renz")
It did the trick but I feel like I cheated and I still hope someone can point what I did wrong in my original code. Thanks.


#3

myName is a variable, not a string, so you shouldn't use quotation marks (") around it


#4

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