Javascript |
Javascript kata |
Node JS |
Data Types |
Variables |
Control Flow |
Scope and Environment |
Objects |
Functions |
Events |
Prototypal Inheritance |
Three.js |
3DE Code Editor |
Javascript
Node JS
"use strict";
Data Types
Variables
There are three ways of variable declaration:
- let - (block-scoped)
- const
- var - (function-scoped
“var” has no block scope. Variables, declared with var, are either function-scoped or global-scoped.
“var” tolerates redeclarations
If we declare the same variable with let twice in the same scope, that’s an error.
“var” variables can be declared below their use. Declarations are hoisted, but assignments are not.
let message;
let message = 'Hello!';
let user = 'John', age = 25, message = 'Hello';
let user = 'John'
, age = 25
, message = 'Hello';
var message = 'Hello';
Control Flow
Scope and Environment
Objects
Functions
Prototypal Inheritance
Events
Three.js
External Links
Videos
Other
http:///wiki/?javascript