function word(num) {
switch(num) {
case 1:
alert("один");
break;
case 2:
alert("два");
break;
case 3:
alert("три");
break;
case 4:
alert("четыре");
break;
case 5:
alert("пять");
break;
case 6:
alert("шесть");
break;
case 7:
alert("семь");
break;
case 8:
alert("восемь");
break;
case 9:
alert("девять");
break;
}
return
}
наклейка windows достаточна при проверках?
(() => {
const arr = [1,2,4,6,8,14,17,18,19,1,2,4,6,8,14,17,18,19];
function split(arr, numParts) {
const partSize = arr.length / numParts | 0;
return Array
.from({ length: numParts }, (n, i) => i * partSize)
.map((n, i, a) => arr.slice(n, a[i + 1]));
}
return split(arr, 4); // Array(4) [ (4) […], (4) […], (4) […], (6) […] ]
return split(arr, 5); // Array(5) [ (3) […], (3) […], (3) […], (3) […], (6) […] ]
return split(arr, 7); // Array(7) [ (2) […], (2) […], (2) […], (2) […], (2) […], (2) […], (6) […] ]
})()