How to declare Java method? How to declare a function in JavaScript?



public void method () {} // example of a method

 

Function Declaration function can be defined variable names without having to assign values ​​to variables. Function Declaration is an independent structure, it can not be nested in a non-functional module. It can be analogized to Variable Declaration (variable declarations). Like Variable Declaration must begin with "var" Like, Function Declaration must "function" at the beginning.

Guess you like

Origin www.cnblogs.com/q2546/p/11411421.html