function numMinusSeven(num) { const arr = []; for (let i = num; i > 0; i -= 7) { arr.push(i - 7); } return arr.length; }; //The function counts iterations until num is => 0;
- function numMinusSeven(num) {
let sssss = []while (num > 0) {num -= 7sssss.push(num)}return sssss.length}- const arr = [];
- for (let i = num; i > 0; i -= 7) {
- arr.push(i - 7);
- }
- return arr.length;
- };
- //The function counts iterations until num is => 0;