js语句及语法(JS statements and syntax).docVIP

  • 23
  • 0
  • 约6.54千字
  • 约 9页
  • 2017-08-15 发布于河南
  • 举报
js语句及语法(JS statements and syntax)

js语句及语法(JS statements and syntax) The statements provided by JavaScript fall into the following categories: 1. variables declaration, assignment statement: var. The syntax is as follows: VAR variable name [= initial value] For example: VAR computer = 32 / / computer definition is a variable, and the initial value is 32. 2. function definition statement: function, return. The syntax is as follows: the function function name (the arguments that the function takes) { Function execution section } The return expression //return statement specifies the value to return. Example: function square (x) {

文档评论(0)

1亿VIP精品文档

相关文档