0
I have a line 5 failure. Thanks you sir. I want to do object.
failure line 5 https://code.sololearn.com/W3NB6Tkg7Lml/?ref=app
5 Respostas
+ 1
It can't work that way.
You can inherit a class or define a function in it
+ 1
You cant define another class inside class, you can make methods inside this class, or inherit from other class.
Here is some resourse about class:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
Here is documentntion about inheritance for class:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/super
Class is used to create objects, old way was using generator functions, thats why you cant do thing you are trying.
+ 1
<DD> you are right
Only thing I found is this article, it use diferent syntax so it is not defining in way you normaly define class.
https://tutorial.eyehunts.com/js/javascript-nested-classes/