Skip to content

Latest commit

ย 

History

History
26 lines (20 loc) ยท 566 Bytes

File metadata and controls

26 lines (20 loc) ยท 566 Bytes

ํ™”์‚ดํ‘œ ํ‘œ๊ธฐ๋ฒ•

  • ์ต๋ช…

๋‹จ์ถ• ๋ฌธ๋ฒ•

  • function ์ƒ๋žต ๊ฐ€๋Šฅ
  • parameter๊ฐ€ ํ•˜๋‚˜๋ฉด ๊ด„ํ˜ธ ์ƒ๋žต ๊ฐ€๋Šฅ
  • body๊ฐ€ ํ‘œํ˜„์‹ ํ•˜๋‚˜๋ฉด ์ค‘๊ด„ํ˜ธ, return๋ฌธ ์ƒ๋žต ๊ฐ€๋Šฅ

์˜ˆ์ œ

const f = function() { return "Hello, World!"; }

const f = () => "Hello, World!";
const f = function(name) { return `Hello, ${name}!`; }

const f = name => `Hello, ${name}!`;
const f = function(a, b) { return a + b; }

const f = (a, b) => a + b;
* Reference : โŒœLearning JavaScriptโŒŸ - Ethan Brown