Interview Question - JavaScript Arrays - Find Flight at index

Опубликовано: 14 Октябрь 2024
на канале: bonsaiilabs
166
3

Browser JavaScript and Event Loop Course is available at http://bit.ly/39eDgEA
The code is available at https://bonsaiilabs.com/js-array-inte...

We need to get the output for this piece of code.
There is a JavaScript array called flights containing 6 flights.
Then, we add to flights array on index 8 a new flight “Virgin Australia”
Finally, we want to log the value at index 7 in flights.
So..let’s understand at what happens when we run this code.

*********Watch all JavaScript Tutorials*********

http://bit.ly/javascript-youtube

***************************************************

Deeksha on Twitter:   / deekshasharma25  

Subscribe for more videos on JavaScript with Visualization:    / @bonsaiilabs  
Follow bonsaiilabs on Twitter:   / bonsaiilabs  
Follow bonsaiilabs on Facebook:   / thebonsaiilabs  
Visit bonsaiilabs at https://bonsaiilabs.com