Initializing Variables with the Assignment Operator i need someone who can unravel this

Initializing Variables with the Assignment Operator i need someone who can unravel this
0

#1

Tell us what’s happening:

Your code so far

// Example
var ourVar = 19;
var avar=9;

// Only change code below this line

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36.

Link to the challenge:


#2

The instructions state to create a variable called a. Instead, you created a variable called avar.


#3

randelldawson is correct !

I will politely add to his answer, in a somewhat newbie coder terms, so you know what initializing a variable means so you can do it every time and know how and why! I am self-taught so if I make an error please point it out. TY!

*** Also, I have learned here in the FreeCodeCamp lessons also you should follow the instructions in detail. I do the same thing too. It’s a learning process we all go through - you’ll do it again. The important thing is realize it and correct it. Good for you ! There are many ways to code a problem. So, taking the example code I will explain a little further.

var ourVar = 19;

The statement above declares a var (variable) named ‘ourVar’ and initializes (initialization) it to the numerical value of 19. You have to initialize the variable ‘ourVar’ in order to use it in your code. The ( = ) is an assignment operator. So, if I were reading this line of code in English, I would say, " I am assigning the numerical integer value of ‘19’ on the right of the assignment operator ( =) to the (var) variable ‘ourVar’ on the left of the assignment operator. Therefore, later in your code, you can use the variable ‘ourVar’ (which by the way, in your own coding ,you can give it any name you please) and it will return the numerical value integer of 19. We say ‘ourVar’ references the value of 19 (or, like a pointer; points to the location of ‘19’ in the computer programing code under the hood).

So I could code,

var myVar = 20;
console.log(myVar); // prints 20 to the screen console.