Skip to main content
caub's user avatar
caub's user avatar
caub's user avatar
caub
  • Member for 9 years, 5 months
  • Last seen more than a month ago
Stats
335
reputation
7k
reached
0
answers
2
questions
Loading…
About
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 Promise.resolve(a)+await new Promise(r=>setTimeout(r(b)));
coolAdd(2,3).then(console.log)

var pi=Promise.reject(1), u=console.log; pi.catch(u)
This user doesn’t have any gold badges yet.
4
silver badges
9
bronze badges
Top tags
0
Score
2
Posts
100
Posts %
0
Score
2
Posts
100
Posts %
0
Score
2
Posts
100
Posts %
0
Score
1
Posts
50
Posts %
Top posts
15
Feb 13, 2015
8
Feb 21, 2015