Need help in 25 variable practice


#1

// On line 2, declare a variable myName and give it your name.
var myName = "Komal";
// On line 4, use console.log to print out the myName variable.
console.log(myName="Komal");
// On line 7, change the value of myName to be just the first 2
// letters of your name.
myName = "Komal".substring(0,2);
// On line 9, use console.log to print out the myName variable.
console.log(myName"Komal");
I there something I am doing wrong here ? Because I keep getting a syntax error message


#2

Hi you should put your code inside the Topic you have in you case inside JavaScript

The error is inside your all yourconsole.log
The first one should be liKe that

console.log(myName)

The second one

console.log(myName)

#3

On line 4, you need to just print the variable "myName". Remove the ="Komal" part.

On line 9, you just need to print the myName variable again. Remove the "Komal" part.