在Javascript中,“控制”的定义是什么?和浏览器的javascript解释器是一样的吗?
这是我读过的两个地方:
"When control comes across such a statement, it immediately jumps out of the current function and gives the returned value to the code that called the function." Eloquent Javascript
"Execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. If no catch block exists among caller functions, the program will terminate." Mozilla Developer Network
最佳答案
JavaScript 是一种命令式编程语言。因此,它的工作原理是按某种顺序依次执行语句。因此,在任何给定时刻,程序中都有一个点“当前正在执行”。
当前执行点被称为“程序计数器”(PC)、“指令指针”(IP)或简称为“控制”。
关于Javascript: "control"的定义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32912028/