Advertisement
boykopk

Untitled

Apr 4th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function stopNumber([num1, num2, num3]) {
  2. let n = Number(num1);
  3. let m = Number(num2);
  4. let s = Number(num3);
  5. let result = '';
  6.  
  7. for (let i = m; i >= n; i--) {
  8.  
  9. if (i % 2 === 0 && i % 3 === 0) {
  10. if (i === s) {
  11. break;
  12. }
  13. result += i + ' ';
  14. }
  15. }
  16. console.log(result);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement