Use fdescribe
and fit
in places of describe
and it
.
Author Archives: lucia
ES6: Tagged Template Literals Explained
What is “Tagged Template Literals”, or “Tagged Templates”?
Let’s take a look at a simplified version of MDN’s very confusing example [1].
Starter ReactJS Project: Terminal Todo
Terminal flavoured todo list, done in ReactJS:
React: Unique Keys in Arrays
According to ReactJS, each child in an array should have a unique “key” prop.
Why?
How?
JavaScript: ValueOf an Object?
Every object in JavaScript inherits a valueOf()
method from Object.prototype
. But when we say obj.valueOf()
, what exactly do we mean, the value of an object?
Permission Denied for mkdir
Just reclaim ownership of the untamed parent directory, instead of sudo
-ing every single time.
Difference: arr.join, arr.toString, arr.toLocaleString
There are multiple ways to churn out a string version of a variable. Take Arrays for example, there are 3: join
, toString
, toLocaleString
.
But what’s the difference?
JavaScript Closure Explained
Normally JavaScript functions can’t remember things. They’re just processes that eat inputs and poop outputs. In, out, gone. No trace left in them. If you were to ask them to personally keep count of the number of times they’ve executed, they would stare back at you with blank, sad eyes.
While closure, simply put, is a JavaScript function that carries its own persistent, private variables [1][2].