Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input){
- let [num, fav] = input;
- //let num = input[0];
- //let fav = input[1];
- let count = 0;
- let result = "";
- if(num % 2 !== 0){
- count++;
- }
- if(num < 0){
- count++;
- }
- if(num % fav === 0){
- count++
- }
- if(count === 0){
- result = "boring";
- }
- if(count === 1){
- result = "awesome";
- }
- if(count === 2){
- result = "super awesome";
- }
- if(count === 3){
- result = "super special awesome";
- }
- console.log(result);
- }
- solve([13,17])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement