whip

Untitled

Mar 28th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. function exerciseFour(age) {
  2. let typeOfLicense;
  3. // In this exercise, you will be given a variable, it will be called: age
  4. // You are also given another variable called: typeOfLicense;
  5. // Using an if/else if/else statement assign typeOfLicense to:
  6. // 'Full License' if age is greater than or equal to 16,
  7. // 'Permit' if age is equal to 15,
  8. // 'None' if age is less than 15
  9. }
  10.  
  11. {
  12. if(typeOfLicense==='Full License') {
  13. age>=16;
  14. }
  15. else if(typeOfLicense==='Permit') {
  16. age=15;
  17. }
  18. if(typeOfLicense==='None') {
  19. age<15;
  20. }
  21.  
  22.  
  23.  
  24. // Please write your answer in the line above.
  25. return typeOfLicense;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment