2 ms·
I would also use some `demand` function or argument-validator in JavaScript to validate that, thats a good practice in anyway, like: `function sum(arr) { goodAr
by chukye 10y ago
I would also use some `demand` function or argument-validator in JavaScript to validate that, thats a good practice in anyway, like: `function sum(arr) { goodArrayOfNumbers(arr); ... }`.
I think that; in JavaScript you NEED to validate your arguments with something like that, you really cant assume nothing. ("Dont assume it, prove it!").