+ 1
Landed! code coach
Hi everyone, im trying to output Flight NGT 929 has landed with this code, in the section "creating your own object" in javascript. if someone can help me, telling me what is wrong of what I forgot, Thank you guys function main() { //take flight number and its status var flightNumber = readLine(); var flightStatus = readLine(); var flight1; //assign a flight object to flight1 variable //output console.log('The flight ' + flight1.number + ' is ' + flight1.status) } function Flight(flightNumber, status) { //fix the constructor this.number = flightNumber; this.status = status; }; var flight1 = new Number("NGT 929"); var flight1 = new status("landed");
1 Answer
0
Your class seems messed up đ€
I have fixed it now
And what is readLine function?
I have removed it as it wasn't defined
https://code.sololearn.com/WZRPgvqK5e30/?ref=app