Message from JavaScript discussions

December 2018

— Noop, you can't const them if you're gonna modify them later

— 

function convert(h, s, v) {
// conversion logic
}

function HSVtoRGB(H, S, V) {
return arguments.length === 1
? convert(H.h, H.s, H.v)
: convert(H, S, V);
}

— This is how I would do it

— Okey, than I'll just recursively call myself

function HSVtoRGB(H, S, V) {
let r;
let g;
let b;
const h = H;
const s = S;
const v = V;
if (arguments.length === 1) {
return HSVtoRGB(H.h, H.s, H.v);
}

Message permanent page

— Lol, nice

— But problematic

— How?

— HSVtoRGB({ h: 4 });

— I can't help stupid users :D

— Uhhh, why use arguments?

— And not spread / rest?

— What do you mean?