0
Plz tell me answer. Can i write class inside of method??
ans
4 ответов
+ 4
no
+ 3
a class may have as many methods as you need
0
thanks friends
0
you can do it in the JavaScript.
function theMethod ( ) {
function MyClass ( ) {
this.a = "Apple" ;
this.b = "Boy" ;
this.c = "Cat" ;
}
theGlobal = new MyClass ( ) ;
}
theMethod ( ) ;
alert ( theGlobal.a ) ;