function
fun() {
document.write(
'Hello World!<br />'
);
}
//saving function in the variable
var
val = fun();
//saving function in the array
arra = [fun()];
//saving function in the object
Obj = {
val: fun()
};
funMake() {
val();
arra[0]();
Obj.val();
function fun() { document.write('Hello World!'); } //saving function in the variable var val = fun(); //saving function in the array var arra = [fun()]; //saving function in the object var Obj = { val: fun() }; function funMake() { val(); arra[0](); Obj.val(); }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
funMake();