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

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

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

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

https://www.youtube.com/watch?v=c3Pail1Iitc&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=32

 

 

syntax/function2.js

console.log(Math.round(1.6));  // 2
console.log(Math.round(1.4));  // 1
 
function sum(first, second){  // ์ •์˜
  console.log(first+second);
}
 
sum(2,4);  // ํ˜ธ์ถœ

์ •์˜, ์„ ์–ธ, ํ˜ธ์ถœ ๊ฐœ๋… ํ™•์‹คํžˆ ์•Œ์•„๋‘˜ ๊ฒƒ

ํ˜ธ์ถœ์„ ๋จผ์ € ํ•˜๊ณ  ์ •์˜๋‚˜ ์„ ์–ธ์„ ํ•˜๋Š”๊ฒŒ ๋…ผ๋ฆฌ์ ์œผ๋กœ ๋งž๋‹ค.

(์œ„ ์ฝ”๋“œ๋Š” ์ •์˜ ๋จผ์ € ํ•˜๊ณ  ํ˜ธ์ถœํ•จ)

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€