Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Lesson 02

In this lesson we learned how to use commentaries and variables.

Contents

Dynamic Typing

Javascript works with dynamic typing in variables.

Variable Identifiers

The variable identifiers must follow some rules:

  1. They must begin with a letter, $ or _;
  2. They can't begin with a number;
  3. It's possible to use letters and numbers;
  4. It's possible to use accents and symbols;
  5. They can't contain spaces;
  6. They can't be reserved words.

Variable Types

  1. number: stores the all types of numbers. Includes two special types: Infinity and NaN.
  2. string: stores a characters array.
  3. boolean: stores the logic data.
  4. null: indicates that the variable have a null value.
  5. undefined: indicates that the variable type is undefined.
  6. object: stores an object. The Array type is an object.
  7. function: indicates a function.

Typeof

Typeof is a function that return the type of the variable passed as argument.