ment 9 Follow The Assignment x emich.edu/courses/34960/assignments/403831 Due Tu
ID: 3704419 • Letter: M
Question
ment 9 Follow The Assignment x emich.edu/courses/34960/assignments/403831 Due Tuesday by 11:59pm Points 40 Submitting a file upload Please download and modify Tutorial20111.html from chapter 20 1. Add an array to hold "Departure Time" for all the flights: (10 points) Time format: "0800A, "1135P" 2. Add two more flights from these two airlines: United and AA, and makeup all the related information. Make sure the user can pick the flight number form the prompt box. (10 points) 3. If the user type in a flight number is not in the flight record, send out a flight number not found message using alert0 and stop the program. (10 points) 4. Using "Table" to display the flight information like the following with color: (hint: use example 203 as reference) (10 points) Here is your flight info Airline: United Flight Number: 111 Terminal: E Gate: 30 Departure Time: 0923P your flight departure time is I/2 hr from now, please proceed to gate. Thank you for choosing our airline. Have a safe and nice trip Home End F6 F7Explanation / Answer
Hi, Please below javascript code for 3rd ppoint
function findFlight(got){
var status = "Not Exist";
var i=-1;
for( i=0; i<flightNumber.length; i++){
if(flightNumber[i] == got){
status = 'Exist';
break;
}
}
if(status == "Not Exist"){
alert("Flight Number Not Found");
}
else{
// Your code to print result of ith element
alert("Flight found "+flightNumber[i]);
}
}
Kindly update your findFlight() as above. and let me know if you have any doubt. And as your code is not clear, kindly update your code to print flight details in else part of above function and remove alert from else part.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.