mirozspace

numbers

Sep 15th, 2020
698
11 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(n, m) {
  2.     n = Number(n);
  3.     m = Number(m);
  4.     let result = 0;
  5.     for (let i = n; i <= m; i++) {
  6.             result += i;    
  7.     }
  8.     console.log(result);
  9. }
RAW Paste Data