SHARE
TWEET

Untitled

a guest Mar 28th, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(age) { // 90 от 100.
  2.  
  3.     //     if (age >= 0 && age <= 2) {
  4.     //         console.log("baby");
  5.     //     } else if (age <= 13) {
  6.     //         console.log("child");
  7.     //     } else if (age <= 19) {
  8.     //         console.log("teenager");
  9.     //     } else if (age <= 65) {
  10.     //         console.log("adult");
  11.     //     } else if (age >= 66) {
  12.     //         console.log("elder");
  13.     //     }
  14.  
  15.     if (age >= 0 && age <= 2) {
  16.         console.log('baby');
  17.     } else if (age >= 3 && age <= 13) {
  18.         console.log('child');
  19.     } else if (age >= 14 && age <= 19) {
  20.         console.log('teenager');
  21.     } else if (age >= 20 && age <= 65) {
  22.         console.log('adult');
  23.     } else if (age >= 66) {
  24.         console.log('elder');
  25.     }
  26. }
  27. solve(3)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top