Plz help in this javascript code. // What wrong in this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Plz help in this javascript code. // What wrong in this code

function main() { //take flight number and its status var flightNumber = readLine(); var flightStatus = readLine(); var flight1= new Flight(flightNumber, flightStatus); //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.flightNumber = flightNumber; this.status = status; };

3rd Nov 2022, 5:56 PM
Sumedh Paikrao
1 Answer
0
what is readLine? Anyway, is always needed some details about the problem (at example posting an error message, a wrong result etc)
3rd Nov 2022, 6:52 PM
KrOW
KrOW - avatar