Getting started with Programming (JavaScript)


#1

Here is my code:

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

This is the error message : Oops, try again. It looks like you didn't log your whole name to the console.

Can anyone help me please, I am lost, ive been stuck on it for about 30 minutes now.


#2

Pass the variable with the console.log, you did fine before and in the end you have not included the variable.


#3

Thank you very much :smiley:
it was a simple thing that stopped me from progressing :sweat: