26. change variable values


#1

Need help, what's wrong?
// On line 2, declare a variable myName and give it your name.
var myName="Pavel";
// 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 = myName.subsrting(0,2);
// On line 9, use console.log to print out the myName variable.
console.log(myName);

i got following in console:
Pavel
TypeError: myName.subsrting is not a function


26 Change variable values
#2

spelling substring correctly does help :wink:


#3

Thanks! That was so silly!=)