๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
JavaScript/Node.js

[Node.js-์ƒํ™œ์ฝ”๋”ฉ] JavaScript - ํ•จ์ˆ˜์˜ ์ถœ๋ ฅ

by ์ฝ”๋”ฉํ•˜๋Š” ๋ถ•์–ด 2021. 1. 28.
๋ฐ˜์‘ํ˜•

[์ถœ์ฒ˜-Youtube ์ƒํ™œ์ฝ”๋”ฉ]

https://www.youtube.com/watch?v=OXGGA-rh__0&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=33

 

 

syntax/function2.js

console.log(Math.round(1.6));  // 2
console.log(Math.round(1.4));  // 1
 
function sum(first, second){  
  return first+second;
}
 
console.log(sum(2,4)); 

return์„ ๋งŒ๋‚˜๋ฉด ์ถœ๋ ฅ ํ›„ ํ•จ์ˆ˜๋Š” ์ฆ‰์‹œ ์ข…๋ฃŒ๋œ๋‹ค.

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€