Sunday, January 18, 2015

things i've learned from javascript the good parts




the bad parts
========================================
type of null is Object
xD ... FWT


use triple equal operator
dont use double equal operator

check if empty or not

somevalues = someArr[x]

if(somevalues === undefined){
alert('wee');
}


0.1 + 0.2 !== 0.3
dont blame javascript here
its a problem with IEEE floating point



JSLint = code quallity checker

==============================

The good parts
lambda

Dynamic objects

Loose Typing

Object Literals


dont use the 'new'

return
{
ok:true
};
doest work , dunno have they fixed these?









No comments:

Post a Comment