Declare variable


#1

// To create a variable, we use only one equals sign
// But to check if two values are equal, we use 3 equal signs.

// declare your variable here:

console.log(myAge);
I'm uncertain as to how I can declare a variable properly.


#2

variableName = "your name here"

on the left hand sight of the equal sign we place the variable name, which we then assign a value of your name here, which is a string. you need to declare a variable called myAge and give it a integer (non decimal number) value

there are some pretty good examples in the lesson on how to declare variables:

var myName = "Leng";
var myAge = 30;
var isOdd = true;

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.