What is “Tagged Template Literals”, or “Tagged Templates”?
Let’s take a look at a simplified version of MDN’s very confusing example [1].
What is “Tagged Template Literals”, or “Tagged Templates”?
Let’s take a look at a simplified version of MDN’s very confusing example [1].
Terminal flavoured todo list, done in ReactJS:
According to ReactJS, each child in an array should have a unique “key” prop.
Why?
How?
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?
Just reclaim ownership of the untamed parent directory, instead of sudo
-ing every single time.
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?
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].
Because of my use of VIM, ESC is much more useful to me than the more easily accessible CapsLock. I’ve always used Seil to switch them, until it started to fail in the new MacOS, Sierra.
After a bit of search, Karabiner solved my problem wonderfully.