Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function exerciseFour(age) {
- let typeOfLicense;
- // In this exercise, you will be given a variable, it will be called: age
- // You are also given another variable called: typeOfLicense;
- // Using an if/else if/else statement assign typeOfLicense to:
- // 'Full License' if age is greater than or equal to 16,
- // 'Permit' if age is equal to 15,
- // 'None' if age is less than 15
- }
- if(typeOfLicense==='Full License') {
- age>=16;
- }
- else if(typeOfLicense==='Permit') {
- age=15;
- }
- if(typeOfLicense==='None') {
- age<15;
- }
- {
- // Please write your answer in the line above.
- return typeOfLicense;
- }
Advertisement
Add Comment
Please, Sign In to add comment