Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stopNumber([num1, num2, num3]) {
- let n = Number(num1);
- let m = Number(num2);
- let s = Number(num3);
- let result = '';
- for (let i = m; i >= n; i--) {
- if (i % 2 === 0 && i % 3 === 0) {
- if (i === s) {
- break;
- }
- result += i + ' ';
- }
- }
- console.log(result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement