I was listening to the Video “The JavaScript Programming Language” (1/4) by Douglas Crockford. Thought I would share few things that I’ve learned from this video which I didn’t know (or may be I forgot?). Presentation Slides are Here.
/*
preTags = document.getElementsByTagName('pre');
for(var i=0; i
It's been advised to use === and !== instead of == and !== for optimization and reliability. Hence, it avoids type coercion (typecasting). 2. bang bang (!!) **This is equal to Boolean() function 3. Unary Operator + ** Here '+' operator performs same thing as Number() function will post the interesting things from the rest of his Videos. Ciao!
2==2
//true
2=="2"
//true
2===2
//true
2==="2"
//false
!!2
//true
!!0
//false
!!""
//false
+"365"
//365
4. Logical Operators - && and || are just like and & or operator in Python.
4 && 5 && 0 && 7
//0 - first faulty operand
0 || "" || 9 || 6
//9 - first truthy operand
-
Anonymous
-
http://www.ecommerce-web-developers.com/ ecommerce development
-
http://www.hire-web-developers.com/ hire a web developer



