-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Description
Maths
-
Number(s)→+[s]+s -
n=n-1→n-- -
n=n+1→n++ - all the
n = n ° m→n°=mfamily, with°being+,-,/,*and% -
ParseFloat(n)→+n -
x!=y→x^yifxandyare integers -
-10→~9,-100→~99, … and so on :D -
N00…0withNan integer →Ne00…0 -
a>=b→a>b-1if-10 < b < 10 -
a<=b→a<b-1if-10 < b < 10 -
Math.abs(a)→a>0?a:-aifais one char. -
Math.sqrt(a)→a**.5
Arrays
-
a.concat()→[...a] -
x[x.length-N]→x.at(N)
Random
-
Math.random()<0.5→new Date&1, asDatereturns a number ofms, albeit it might be problematic if called in a super-tight loop. -
Math.floor(Math.random()*N))→new Date%N
Misc
-
while(1)→for(;;)
Metadata
Metadata
Assignees
Labels
No labels