본문 바로가기
컴퓨터이야기/JavaScript

화살표 함수 예시4

by 변화지시자 2023. 3. 16.
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <title>Counter</title>
</head>
<body>

  <script>


let sum = (a, b) => a + b;

document.write(sum(8, 2))



let mul = function(a, b) {
   return a * b;
};
document.write(mul(3, 5));

  </script>
</body>
</html>