i dont understand this js function
good day guys, i google this function and asked gpt but still i dont understand. can someone explain to me?
3 Replies
as from code nums is the array but please specifiy what is k
where did you get this code? It feels a little like a homework assignment to figure out what it does because that's not terribly useful
I did not find it any where
this code is simply add the whole array and returning the result
I do not recommend to use that, you can write more efficient code using es6