Types, Values, and Variables Back

  • JavaScript's types can be divided into primitive types and object types.
  • JavaScript's types can also be categorized as mutable and immutable types.
    • mutable types: value can change
      • Objects
      • Arrays
      • ...
    • immutable types: value can not change
      • Numbers
      • booleans
      • null
      • undefined
      • strings
      • symbol (new in ES6)
      • ...
var x;
x = 0;
x    //=>0

//JavaScript supports several types of values
x = 1;    //integers
x = 0.1;    //real
x = "Aloha";    //String in quatation marks
x = 'Aloha';    //String in single quatations 
x = true;    //boolean
x = null;    //no value
x = undefined;    //like null
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.