Is it possible to name standard string in an inherited class?

Hey Guys

trying out things i learned mysef :slight_smile: .
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 :slight_smile:

kind regards

Yannick

the strings:

“F”

look to be surrounded by smart quotes, that could be problematic. you should use quotation marks.

1 Like

Details, details, details :slight_smile:

wasted hours on this :slight_smile:

Focus Yannick

Thanks Stetim!!