I get
Uncaught SyntaxError: Unexpected identifier
in the marked line below. I have no idea what to do. Tried all sorts of things but it seems like a fundamental mistake I have made.
class Order {
constructor(pVornameS, pNachnameS, pKlasseS, pVornameE, pNachnameE, pKlasseE) {
this.vornameS = pVornameS;
this.nachnameS = pNachnameS;
this.klasseS = pKlasseS;
this.vornameE = pVornameE;
this.nachnameE = pNachnameE;
this.klasseE = pKlasseE;
}
function getVornameS() { //The error occurs in this line
return vornameS;
}
function getNachnameS() {
return nachnameS;
}
function getKlasseS() {
return klasseS;
}
function getVornameE() {
return vornameE;
}
function getNachnameE() {
return nachnameE;
}
function getKlasseE() {
return klasseE;
}
}
function.this.…to access your properties in the getter methods