Part 6
Prerequisiteβ
- Javascript Basics
- JavaScript: Understanding the Weird Parts in 35ish minutes - Introduction
- JavaScript: Understanding the Weird Parts in 35ish minutes - Part 1/6
- JavaScript: Understanding the Weird Parts in 35ish minutes - Part 2/6
- JavaScript: Understanding the Weird Parts in 35ish minutes - Part 3/6
- JavaScript: Understanding the Weird Parts in 35ish minutes - Part 4/6
- Willingness to learn
#BIGWORD - Syntactic Sugar : A different way to Type something that doesnβt change how it works under the hood.
Section 7 - Odds and Endsβ
Chapter 65- Initializationβ
var peope = [
{
firstname: βJoeβ,
lastname: βDoeβ,
addresses: [
β111 Main stβ,
β222 Third stβ
]
},
{
firstname: βJaneβ,
lastname: βDoeβ,
addresses: [
β333 Main stβ,
β444 Fifth stβ
],
greet: function(){
return βHelloβ;
}
}
];
Chapter 66- 'tyepof', 'instaceof', and Figuring Out What Something Isβ
var a = 3;
console.log(typeof a); //number
var b = βHelloβ;
console.log(typeof b); //string
var c = {};
console.log(typeof c); //object
var d = [];
console.log(typeof d); //object //weird
console.log(Object.prototype.toString.call(d)); //object Array //better
function Person(name){
this.name = name;
}
var e = new Person(βJaneβ);
console.log(typeof e); // object
console.log(e instanceof Person); //true
console.log(typeof undefined); //undefined // makes sense
console.log(typeof null); //object // a bug since, like , forever..
var z = function() { };
console.log(typeof z); //function
Chapter 67- Strict Modeβ
Example 1
var person ;
persom = {};
console.log(persom) // Object {}
Example 2
βuse strictβ
var person ;
persom = {};
console.log(persom) // Uncaught reference error : persom is not defined
Creditsβ
- Anthony Alicea, follow him on Twitter