Home > Web Front-end > JS Tutorial > How to define functions in javascript_javascript skills

How to define functions in javascript_javascript skills

WBOY
Release: 2016-05-16 18:14:17
Original
1001 people have browsed it

The following is the sample code for various methods

Copy the code The code is as follows:








The running result is:
Call the general method:
------------------ -------------------------------------------------- ------------
Call the constructor method: add1(5,6)
11
----------------- -------------------------------------------------- -------------
Call function direct measurement method: result(3,4)
7
Call function direct measurement method: result2(3)
6
------------------------------------------------ --------------------------------
Function used as data
(2 3) (4*5 )=25
-------------------------------------------------- ------------------------------------
hello world
100
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template