3 ms·
Okay. function f(n) { return -Math.abs(n) } EDIT: something that works for negative numbers: function f(n) { return -n[0] || [n] }
by ricardobeat 13y ago
Okay.
function f(n) { return -Math.abs(n) }
EDIT: something that works for negative numbers:
function f(n) { return -n[0] || [n] }