// 함수 선언식
function func(...params) {
// statement
}
let func = function(...params) {
// statement
}
function func(a, b, c) {
console.log(arguments)
}
func(1, 2, 3) // Arguments(3) [1, 2, 3, callee: ƒ, Symbol(Symbol.iterator): ƒ]
let func = {
test = "test"
method = function() {return 1}
method1() {
return this.test
}
}
func.method(); // 1
func.method1(); // "test"
Reference
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Functions