100 Days Of Javascript

  • Javascript for in and for of

    Day 4: for in and for of loops In short, Iterates over statements which are true. From Course: Javascript for WP MDN for in MDN for of   The differences between for of and for in are illustrated below. However, I still can’t wrap my head around it. Object.prototype.objCustom = function() {}; Array.prototype.arrCustom = function()…

  • Coercion in Javascript

    Coercion in Javascript

    Day 3: Coercion To oversimplify this is the act of converting a value from one type to another. An array to a number, a string to an boolean etc. var a = 42; var b = a + “”; // implicit coercion var c = String( a ); // explicit coercion You Don’t Know JS

  • Javascript Loop

    Javascript Loop

    Day Two – Loops Took a look at the for and for / in loops and how they’re used in variables and objects to pull information. var warGoodForObject = { “what”: “nothing”, “who”: “no one” }; for( var name in warGoodForObject ) { console.log ( name + “: ” + warGoodForObject[name] ); } Results in…