Javascript basic tutorial function with parameters

Function with parameters

Syntax:

function sum(parameter 1, parameter 2){

Function code;

}

Note: According to the needs of partners, there are not fixed 2 parameters, one can be used, or 3 can be used

Let’s write an example of a function with parameters, the code As follows:

    函数  

In this way, the code of our function will be relatively concise

Let’s write an example below:

    函数  


Continuing Learning
||
函数
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!