I’m total new & dummy to this whole coding and I’m excited to learn more about it however, I can’t even pass the 2nd test which requires me to var myName; i have follow the steps and still say I didn’t do it the right way.
What is the right way to variable myName?
I have tried :-
var myName = "ash";
var myName;
var myName = "ash123";
All the above doesn’t allow me to change, did I missed anything?
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
syntax for declaring variable are
1st way : using var keyword;
var variableName = 'value of variable;
examples :
var name = ‘rio’;
var age = 19;
var developer = true;
2nd way ; using let keyword
let variableName = ‘value of variable’;
examples:
let name = ‘rio’;
let age = 19;
let developer = true;
3rd way using const keyword:
const variableName = ‘variable value’;
examples :
const name = ‘rio’;
const age = 19;
const coder = true;
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.