首页 > 编程语言 > 详细

JavaScript语句 Statement

时间:2020-06-11 16:02:36      阅读:58      评论:0      收藏:0      [点我收藏+]
  • Atom
  • Expression
  • Statement #这里讲的主要是这个 看 ECMA-262 里面就能够很清晰的看到这些JS 的statement
  • Structure
  • Program/Module

Grammar

简单语句
  • Expression Statement 表达式语句
    • a = 1 + 2;
  • Empty Statement 空语句
    • ;
  • Debugger Statement debugger语句,运行时不产生作用
    • debugger;
  • ThrowStatement
    • throw a;
  • Continue Statement(与循环相互匹配)
    • continue label1;
  • Break Statement(与循环匹配)
    • break label2;
  • Return Statement
    • return; / return 1;
组合语句
  • Block Statement
{
...
...
}
  • Iteration
while()
do...while
for
for...in...
for...of...
声明
  • FunctionDeclaration
  • GeneratorDeclaration
  • AsyncFunctionDeclaration
  • AsyncGeneratorDeclaration
  • VariableStatemeny
  • ClassDeclaration
  • LexicalDeclaration
标签、循环、break、continue
  • LabelledStatement
  • IterationStatement
  • ContinueStatement
  • BreakStatement
  • SwitchStatement

Runtime:

  • Complection Record
    • [[type]]: normal, break, continue, return, throw
    • [[value]]: Types
    • [[target]]: label
  • Lexical Enviorment(推荐使用前三种)
    • {} . [] Object.defineProperty
    • Object.create Object.setPrototypeOf Object.getPrototypeOf
    • new class extends
    • new function prototype(用这种会被打死)

JavaScript语句 Statement

原文:https://www.cnblogs.com/ssaylo/p/13092743.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!