티스토리 뷰

<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

<script type="text/javascript">

var var1 = 10;

var var2 = 7; 

document.write("합 = "+add(var1,var2)+"<br/>");

document.write("차 = "+subtract(var1,var2)+"<br/>");


function add(a,b){return a+b;}

function subtract(a,b){return a-b;}

</script>

</head>

<body>


</body>

</html>



합 = 17
차 = 3

댓글
댓글쓰기 폼