— 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);
}
Message permanent page
— 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
— I can't help stupid users :D
— Uhhh, why use arguments?