Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function solve(input){
  2. let [num, fav] = input;
  3. //let num = input[0];
  4. //let fav = input[1];
  5. let count = 0;
  6. let result = "";
  7. if(num % 2 !== 0){
  8. count++;
  9. }
  10. if(num < 0){
  11. count++;
  12. }
  13. if(num % fav === 0){
  14. count++
  15. }
  16. if(count === 0){
  17. result = "boring";
  18. }
  19. if(count === 1){
  20. result = "awesome";
  21. }
  22. if(count === 2){
  23. result = "super awesome";
  24. }
  25. if(count === 3){
  26. result = "super special awesome";
  27. }
  28. console.log(result);
  29.  
  30. }
  31. solve([13,17])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement