📚 Reference


📜 Chapter


if

switch

Ternary operator (삼항 연산자)


예시


function getResult(score){
	let result;
	if (score > 5) {
		result = '👍';
	} else if (score <= 5) {
		result = '👎';
	}
	return result;
}