JSFiddle - React, Tailwind, and code Playground
by dkunin
JavaScript
//Object.prototype.valueOf = function(){ return 'nono'}
function sentence(t) {
var text = t;
function te(t2){
text+= ' ' + t2
console.log(text)
return te;
}
te.valueOf = function(){return text}
return te;
}
sentence('hello')('world')('smth')('whatever')
function sum() {
// return the sum of all arguments given.
var summ = [].reduce.call(arguments, function(a,b){return a+b},0)
return summ
}
console.log(sum(1,2))