Problem with program using objects
This program should display something like Flight NGT 929 has landed, I added a readline() variable (letters) that should hold the NGT letters, please look at the remarks, I am getting a syntax error, and I have no clue about what I'm doing. Here's the code: function main() { //take flight number and its status var flightNumber = readLine(); var flightStatus = readLine(); // ***** I added var letters below**** var letters = readLine(); var flight1; //assign a flight object to flight1 variable //output console.log('The flight ' flight1.letters + flight1.number + ' is ' + flight1.status) } function Flight(flightNumber, status, letters) { //fix the constructor this.number = flightNumber; this.status = flightStatus; this.letters = flight1; }; /*****REMARKS TO HELP WITH SYNTAX******** function person (name, age) { this.name = name; this.age = age; } var John = new person("John", 25); */