+ 1

function main(){ var flightNumber = readLine(); var fligtStatus = readLIne(); var flight1= new Flight(flightNumber

What might be wrong? Its not running.

9th Mar 2023, 7:28 AM
Stephen Mutheu Muya
Stephen Mutheu Muya - avatar
3 RĂ©ponses
+ 2
function main() { var flightNumber = readLine(); var flightStatus = readLine(); var flight1 = new Flight(flightNumber, flightStatus); console.log('The flight ' + flight1.number + ' is ' + flight1.status); } function Flight(flightNumber, status) { this.number = flightNumber; this.status = status; }; Check your mistake and then correct it
9th Mar 2023, 7:54 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
Please share the code, we try to solve your doubt.
9th Mar 2023, 7:36 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
0
function main() { var flightNumber = readLIne(); var flightStatus = readLIne(); var flight1 = new Flight(flightNumber, flightStatus); console.log('The flight' + flight.number + 'is' + flight1.status); } function Flight(flightNumber, status) { this.number = flightNumber; this.status = status; };
9th Mar 2023, 7:45 AM
Stephen Mutheu Muya
Stephen Mutheu Muya - avatar