encho253

Untitled

Jan 27th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sum(param) {
  2.     let result = 0;
  3.     for (let i = 0; i < param.length; i += 1) {
  4.         if (!Number.isNaN(Number(param[i]))) {
  5.             result += param[i];
  6.         }
  7.     }
  8.     console.log(result);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment