In JS there are 5 primitive data types:

  1. Number
  2. String
  3. Boolean
  4. Undefined
  5. Null

Variables are declared in JS like so:

var name = 'John';
console.log(name);

var lastName = 'Smith';
console.log(lastName);

var age = 26;
console.log(age);

var fullAge = true;
console.log(fullAge);

And because the statement ‘console.log()’ is used, the values of these variables are logged in the developer console like so:

Screen Shot 2018-03-29 at 2.26.27 pm.png

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s