JavaScript is an event-driven as it brings together multiple events occurring at the same time in order to simplify the program. JavaScript will continue to look for events to run over and over until it cannot anymore. For instance, during a while loop JavaScript will continue to run, or respond to the event, over and over until the while loop meets a condition. JavaScript reacts to the event of the while loop for as long as the loop remains true. With if/else statements, JavaScript will look to react if certain conditions are met, but if they are not, JavaScript will look to find an alternative reaction to run for the statement. JavaScript will react to the events in the order that the code is written and laid out. JavaScript will also react to more coding aspects such as links, mathematical operators, boolean values, and so much more in order to create an interactive page. In the end, JavaScript will continue to look for more events to react to until there are simply no more left to touch. This event-driven program will go to work in order to bring programs to life for the user.
Leave a Reply
You must be logged in to post a comment.