Landed! code coach | Sololearn: Learn to code for FREE!

0

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");

4/8/2021 12:54:23 PM

Hamza Bouzerda

1 Answer

New 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