We have variable declaration, it means creating a place to allow us keep something on it. we also name it for accessing it.
in js, we use var for declare one variable using var keyword, so easy like
This means create a variable(a place to keep stuff) with name a.
now you can put things(number, strings, etc…) to this
a we created. using
remember, always the right part of the = will be go to left side, example;
means put number 5 to our variable a. so now a is 5.
We also can declare multiple variables by one
var, like this
var a, b;
it’s equal to following
Once You declare a variable, you may not declare it again. it’s just like once you eat your dinner, you cannot eat it again.
so this is wrong
Now the challenge needs you to declare two variable
b, and assign (using
=) values 5 and 7 to them.
Suggestion: if js is kind of confusing for you for now, I suggest you start from HTML and CSS, then you may have some study about flowchart and pseudocode
keep goin on great work, happy programming