Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (num, fav) {
- let aCount = 0;
- if (num % 2 !== 0) {
- aCount++;
- }
- if (num < 0) {
- aCount++;
- }
- if (num % fav === 0) {
- aCount++;
- }
- switch (aCount) {
- case 0:
- console.log('boring');
- break;
- case 1:
- console.log('awesome');
- break;
- case 2:
- console.log('super awesome');
- break;
- case 3:
- console.log('super special awesome');
- break;
- default:
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment