Training JavaScript
Foundation
JavaScript Series
Language basics
Variable
Variable
JavaScript is a loosely typed or a dynamic language.
Primitive
other
Variable
boolean Conversions
false
true
Object
An object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods when they are inside objects.)
Array is Object
var person = {
name: ['Bob', 'Smith'],
age: 32,
gender: 'male',
interests: ['music', 'skiing'],
bio: function() {
alert(this.name[0] + ' ' + this.name[1] + ' is ' + this.age + ' years old. He likes ' + this.interests[0] + ' and ' + this.interests[1] + '.');
},
greeting: function() {
alert('Hi! I\'m ' + this.name[0] + '.');
}
};
Function
points
Function
points
Scope
Prototype
Object.prototype is a object: Object is a inner Function
Function.prototype is a function: Function is a inner Function
Closure
Node.js
Thank you