purpose of settimeout in javascript code example
Example 1: currying in javascript
//No currying
function volume(w, h, l) {
return w * h * l;
}
volume(4, 6, 3); // 72
//Currying
function volume(w) {
return function(h) {
return function(l) {
return w * h* l;
}
}
}
volume(4)(6)(3); // 72
Example 2: ~~ in javascript
~~'-1' = -1
~~true = 1
~~false = 0
~~5.6 = 5