showing results for - "if and else shorthand"
Miranda
10 May 2019
1//Long version  
2let points = 70;   
3let result;   
4if(marks >= 50){  
5    result = 'Pass';   
6}else{  
7    result = 'Fail';   
8}
9
10//Shorthand  
11let points = 70;   
12let result = marks >= 50 ? 'Pass' : 'Fail';   
13