"> 03-02_return_argument "> 03-02_return_argument ">
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>03-02_return_argument</title>
<script type="text/javascript">
	/*
		# return
	*/
	function point() {
		let java = 100;
		let html = 97;
		let avg = (java + html) / 2;
		return avg;
	}
	document.write('평균 : ' + point() + '<br/></br>');
	
	/*
		# 매개변수
	*/
	function pass(name, sub1, sub2, sub3){
		let res = name + ' - ';
		if(sub1 >= 60 && sub2 >=60 && sub3 >=60 ){
			res += 'pass';
		} else {
			res += 'fail';
		}
		return res += '<br/>';
	}
	document.write(pass('stuA', 60, 60, 60));
	document.write(pass('stuB', 60, 60, 59));
	document.write(pass('stuC', 60, 60));
	
	function print(name, count){
		if(!count){
			count = 1;
		}
		console.log(`${name} 이/가 ${count} 개를 가지고 있습니다.`);
	}
	print('사과', 7);
	
	let add = (s1, s2) => s1+s2;
	console.log('1 + 7 : ' + add(1, 7));
</script>
</head>
<body>

</body>
</html>