Why does void in Javascript require an argument?

后端 未结 2 557
伪装坚强ぢ
伪装坚强ぢ 2021-01-11 18:48

From what I understand, the keyword void in Javascript is some kind of function that takes one argument and always returns the undefined value. For

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-11 19:12

    void also evaluates the expression you pass to it. It doesn't just return undefined.

提交回复
热议问题