caub

2,709
reputation
2
28
31
var digest = (a,x) => a+x.replace(/\w/g, i=>Math.random()<.2?i:'');

['peach', 'tomato', 'fig'].reduce(digest)


// safe:) addition function
var safeAdd = (a,b,i=100) => Number(eval(`${`\`\${`.repeat(i)}${a}+${b}${`}\``.repeat(i)}`));
safeAdd(1,2) // 3

// other one:
var coolAdd = async (a,b) => await a + await new Promise(r=>setTimeout(r, 5000, b));
await coolAdd(2,3) // 5

var pi=Promise.reject(''), u=console.log; pi.catch(u);

Math.sign(in); Math.log(out);