ECMAScript Specification: meaning of question mark

2019-07-11 10:48发布

I have see many occurrence of Let value be ?, Return ? sth in the specification.example

Anyone know what is the meaning of the ?.

1条回答
神经病院院长
2楼-- · 2019-07-11 11:36

From Algorithm Conventions,

Abstract operations referenced using the functional application style and the method application style that are prefixed by ? indicate that ReturnIfAbrupt should be applied to the resulting Completion Record.

For example, ? operationName() is equivalent to ReturnIfAbrupt(operationName()).

Similarly, ? someValue.operationName() is equivalent to ReturnIfAbrupt(someValue.operationName()).

查看更多
登录 后发表回答