131. javascript word

변지영·2021년 12월 9일
0
//function declaration
function newFunction() {

}

//function expression
var newFunction = function(){

};

//expression is something produces a value.
1+3;
var a = 2;
return true;

//calling or invoking a function
alert();
newFunction(param1, param2);

//assign a variable
var a = true;

//function vs method
function thisIsAFunction(){

}

//method is something inside of an object, like 'thisIsAMethod'
var obj = {
	thisIsAMethod: function(){

	}
}

0개의 댓글