why is class a reserved word in JavaScript?

后端 未结 5 1913
渐次进展
渐次进展 2020-11-29 08:25

I am planning to implement class inherit interface using JavaScript. class is the perfect word as the name of the constructor.

class = function          


        
5条回答
  •  醉话见心
    2020-11-29 08:51

    class is reserved as a future keyword by the ECMAScript specification

    Reserved Words - MDN

提交回复
热议问题