Ad
Code
Diff
  • should_return_1=_=>-~!_
    • def should_return_1():
    • x = 12354234 - 12354233
    • return x
    • should_return_1=_=>-~!_
Code
Diff
  • const addArr = arr => arr.reduce((a, b) => a + b, 0) || null;
    • function addArr(arr){
    • if(arr.length === 0) return null
    • let final = 0
    • arr.forEach(num => {
    • final += num
    • })
    • return final
    • }
    • const addArr = arr => arr.reduce((a, b) => a + b, 0) || null;