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?
Monthly Archives: October 2016
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].
Remapping Keys in Sierra
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.