const sumNechet = (a, b) =>{ let answer = 0; for (let index = a; index <= b; index++) { index % 2 == 1 ? answer += index : null; } return answer; } console.log(sumNechet(5,15));
//Крюков Кириллfunction sumNechet(a, b) {var answer = 0;for (var i = a; i <= b; i++){if (i % 2 != 0){answer += i;- const sumNechet = (a, b) =>{
- let answer = 0;
- for (let index = a; index <= b; index++) {
- index % 2 == 1 ? answer += index : null;
- }
}return answer;}- return answer;
- }
- console.log(sumNechet(5,15));
const nums = [ {0 : "zero"}, {1 : "one"}, {2 : "two"}, {3 : "three"}, {4 : "four"}, {5 : "five"}, {6 : "six"}, {7 : "seven"}, {8 : "eight"}, {9 : "nine"} ] function digitToText(digit) { if(digit > 9 || digit < 0){ return undefined }else{ return nums[digit][digit] } }
const nums = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']- const nums = [
- {0 : "zero"},
- {1 : "one"},
- {2 : "two"},
- {3 : "three"},
- {4 : "four"},
- {5 : "five"},
- {6 : "six"},
- {7 : "seven"},
- {8 : "eight"},
- {9 : "nine"}
- ]
- function digitToText(digit) {
return nums[digit]- if(digit > 9 || digit < 0){
- return undefined
- }else{
- return nums[digit][digit]
- }
- }