If Statements

jr·2021년 4월 15일

Just want to note an interesting syntax used for if statements:
if condition_statement ? true_value : false_value;
e.g. if i>20 ? "Greater" : "Smaller";

? is a ternary operator.

profile
My journey starts from Googling "What is a computer language?"

0개의 댓글