var obj = Object.create(null); obj.a = 3; obj.b = 5; for (var p in obj) { if (obj.hasOwnProperty(p)) { console.log(obj[p]); } } TypeError: [Object Object] has no method hasOwnProperty
//using Ramanujan's approximation function factorial(n){ var r = Math.sqrt(Math.PI)*Math.pow(n/Math.E,n); r *= Math.pow(8*Math.pow(n, 3) + 4*(n*n) + n + 1/30, 1/6); return r; }
//using Ramanujan's approximation function factorial(n){ var r = Math.sqrt(Math.PI)*Math.pow(n/Math.E,n); r *= Math.pow(8*Math.pow(n, 3) + 4*(n*n) + n + 1/30, 1/6); return r; }
“use [] not new Array” “aren't r and i also global?” “eval.....” “global arr variable :P” “Why is it Useful?” “evil() is like cheating” “no global functions!”
Picture Credits Mr Perfect by Roger Hargreaves http://www.mrmen.com/characters/mr-perfect/index.html If Hemingway wrote JavaScript by Angus Croll No Starch Press Bayeux Tapestry Maker http://bayeux.datensalat.net The Scream by Edvard Munch JavaScript: Good Parts by Douglas Crockford http://shop.oreilly.com/product/9780596517748.do cheetah cubs 2013bestpicz.blogspot.co.uk lion cubs https://c2.staticflickr.com/6/5339/6947068456_0b99b8fa58_z.jpg