Changing variable name


#1

// On line 2, declare a variable myName and give it your name.
var myName ="nishit";
// 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.
myName = "chshit";
// On line 9, use console.log to print out the myName variable.
i m stuck in this portion it say you " its look like you didnt log your whole name so tell me what to do???


#2

is exactly the same as on line 4?

except, on line 7, you should have updated your code to contain only the first two letters of your name. (ideally, you would use substring)


#3

// On line 2, declare a variable myName and give it your name.
var myName ="nishit";
// 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.
myName = "chshit";
// On line 9, use console.log to print out the myName variable.
console.log(myName);

now its say you didnt log your first 2 letter of your name so plz help i m stuck here


#4

okay i got it thanks


#5

// On line 7, change the value of myName to be just the first 2
// letters of your name.
myName = "chshit";

chshit is cleary more then 2 letters? Ideally, use substring() to get the first to letters of myName


#6

or i can use myName = "ch";


#7