25. Having some issues with the variable here is the code that I am using


#1

Having some issues with the variable here is the code that I am using.

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


25. More Variable Practice
#2

Hi Tymothy,

To change the value of myName, you will need to begin your command with

myName =

Next, note the similarities here:

// On line 4, use console.log to print out the myName variable.
// On line 9, use console.log to print out the myName variable.


#3

hi Tym

remember with substrings 1 is between the 1st and 2nd letter and the 2nd is between the 2nd and 3rd and so on and so forth i.e.\/
Ryan.substring(0.3) /*equals Rya


#4

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