Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const carType ='sport'
- switch (carType){
- case 'suv':
- console.log('This isnt your car type.')
- break
- case 'sedan':
- console.log('This isnt your car type.')
- break
- case 'truck':
- console.log('This isnt your car type.')
- break
- case 'sport':
- console.log('This is your car type.')
- break
- default:
- console.log('Found nothing');
- }
- //Create your own switch
- const diffSchools = 'GBC';
- switch(diffSchools){
- case "GBC":
- console.log('This is your school');
- break;
- case 'York':
- console.log("This is not your school");
- break;
- case 'University of Toronto':
- console.log("This is not your school");
- break;
- case 'Ryerson':
- console.log("This is not your school");
- break;
- case 'Seneca':
- console.log("This is not your school");
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement