Hey Guys
trying out things i learned mysef .
I need to use inherited classes for a big database. I will show you the code with only the properties.
I want for an object inputted in women class to get a string appointed “F” of “Female”. For the man class I would like it to receive the string “G” or “Gents”. This string however, gives me a:
VM1994:14 Uncaught SyntaxError: Invalid or unexpected token --> referencing to the F and G.
is what I am trying to do possible? What should I alter in my code then?
class Clothes {
constructor(namepiece, kind, size) {
this._namepiece = namepiece;
this._kind = kind;
this._size = size;
}
}
class Women extends Clothes {
constructor(namepiece, kind, size) {
super(namepiece, kind, size);
this._sex = “F”;
}
}
class Gents extends Clothes {
constructor(namepiece, kind, size) {
super(namepiece, kind, size);
this._sex = “M”;
}
}
Thanks for your enormous support always
kind regards
Yannick