Skip to main content
caub's user avatar
caub's user avatar
caub's user avatar
caub
Full-stack JS engineer
  • Member for 12 years
  • Last seen this week

Stats

2,779
reputation
2.1m
reached
10
answers
1
question
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 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);
2
gold badges
31
silver badges
32
bronze badges
149
Score
7
Posts
64
Posts %
126
Score
2
Posts
18
Posts %
126
Score
2
Posts
18
Posts %
52
Score
1
Posts
9
Posts %
52
Score
1
Posts
9
Posts %
52
Score
1
Posts
9
Posts %

Top posts

View all questions, answers, and articles