function in JavaScript

Source: Internet
Author: User

Function/Object

All variables and method names: With letters, $ _ other casually, try to use the English alphabet name, see the name of the meaning
Note: You are not allowed to define the names of variables and methods using keywords.
The = = function is the method, the method is the function
= = = Baidu: JavaScript keyword
Format: function name (definition rule for variables) (parameter list) {
function body

Return ""; Do not have to return, you have to use return when necessary, you intend to put the function of the data you feel to return,
};

Note two: Consider function as a data type, "do not act as a method."
Look at it as you define a variable.

Summarize:
1: If the function does not return a value, the return is undefined
2: A function is a data type,
3: Execute function is: function name ();
4: Parameter list, divided into formal parameters and actual arguments

function in JavaScript

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.