## Maths - [x] `Number(s)` → ~`+[s]`~ `+s` - [ ] `n=n-1` → `n--` - [ ] `n=n+1` → `n++` - [ ] all the `n = n ° m` → `n°=m` family, with `°` being `+`, `-`, `/`, `*` and `%` - [x] ~~`ParseFloat(n)` → `+n`~~ - [ ] `x!=y` → `x^y` if `x` and `y` are integers - [ ] `-10` → `~9`, `-100` → `~99`, … and so on :D - [x] `N00…0` with `N` an integer → `Ne00…0` - [ ] `a>=b` → `a>b-1` if `-10 < b < 10` - [ ] `a<=b` → `a<b-1` if `-10 < b < 10` - [x] `Math.abs(a)` → `a>0?a:-a` if `a` is 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`, as `Date` returns a number of `ms`, albeit it might be problematic if called in a super-tight loop. - [ ] `Math.floor(Math.random()*N))` → `new Date%N` ## Misc - [x] `while(1)` → `for(;;)`
Maths
Number(s)→+[s]+sn=n-1→n--n=n+1→n++n = n ° m→n°=mfamily, with°being+,-,/,*and%ParseFloat(n)→+nx!=y→x^yifxandyare integers-10→~9,-100→~99, … and so on :DN00…0withNan integer →Ne00…0a>=b→a>b-1if-10 < b < 10a<=b→a<b-1if-10 < b < 10Math.abs(a)→a>0?a:-aifais one char.Math.sqrt(a)→a**.5Arrays
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%NMisc
while(1)→for(;;)