Skip to main content

Tedshd's Dev note

JavaScript function

Table of Contents

# function

function fun() {
	// do something
}
fun();
var fun = function () {
    // do something
};
fun();

立即函數(建立後立即執行,只執行此次)

var fun = (function () {
    // do something
}());