Ad
Code
Diff
  • sumNechet = (a, b) => (b/2).toFixed()**2;
    • //Крюков Кирилл
    • function sumNechet(a, b) {
    • var answer = 0;
    • for (var i = a; i <= b; i++){
    • if (i % 2 != 0){
    • answer += i;
    • }
    • }
    • return answer;
    • }
    • console.log(sumNechet(5,15));
    • sumNechet = (a, b) => (b/2).toFixed()**2;