0

Bob was hired as an airport information officer and needs to generate status messages for each flight․ Let’s help him! Complete

The code i have written is giving an error

21st Oct 2020, 4:54 AM
Aditya Kumar
8 Respuestas
+ 5
Post ur code , so we can help solve the error.
21st Oct 2020, 4:55 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
Here's my code, hope it helps: 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, flightStatus) { this.number = flightNumber; this.status = flightStatus; };
20th Dec 2020, 5:10 PM
Ульяна Романова
Ульяна Романова - avatar
0
Post the link to your "error code"
21st Oct 2020, 5:00 AM
Shadoff
Shadoff - avatar
21st Oct 2020, 5:02 AM
Aditya Kumar
0
My code
21st Oct 2020, 5:02 AM
Aditya Kumar
0
We can't see your code from code coach, copy paste it on platform and share the link here :p
21st Oct 2020, 5:04 AM
Raj Chhatrala
Raj Chhatrala - avatar
0
function main() { //take flight number and its status var flightNumber = readLine(); var flightStatus = readLine(); var flight1; //assign a flight object to flight1 variable //output } function Flight(number, status) { //fix the constructor this.number = flightNumber ; this.status = flightStatus ; }; var flight1 = new Flight; console.log('The flight ' + flight1.number + ' is ' + flight1.status);
22nd Oct 2020, 12:59 PM
Aditya Kumar
0
My code
22nd Oct 2020, 12:59 PM
Aditya Kumar