JavaScript is “event-driven” because it is an interactive language. It is always waiting for the user to do something. Typing on a keyboard, submitting a form, refreshing a screen, and many other things prompt the program to execute some form of code. On a website, though, there are several other factors working behind the scenes. HTML, which stands for Hypertext Markup Language, is responsible for displaying the content that you see. In addition, CSS (Cascading Style Sheets) controls the formatting and layout of the website. It can format multiple pages and save a lot of time for programmers. Neither HTML and CSS have the ability to be interactive, so that’s why JavaScript is super important. Many websites that rely on interactivity, such as Amazon, Google, Gmail and other email sites are dependent on the capabilities of JavaScript, HTML, and CSS. Without their existence and collaboration, so many websites wouldn’t work correctly or at all.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Hi Madeline,
When I read the question about Javascript event-driven, I had a hard time understanding what that meant until I read your post, it made things very clear and simple about what the question was asked. The way you describe javascript is an interactive language and then use examples, “typing on a keyboard, submitting a form, refreshing a screen, and many other things prompt the program to execute some form of code. ” was very helpful and useful.
Hello Madeline,
Thank you for your post! You did a great job explaining how and why Javascript is an event-driven program. The couple of examples you included on how Javascript it’s an interactive platform were very helpful and I believe very important when trying to understand what exactly it means. When I think of Javascript being an event-driven platform, I try to remind myself that it pretty much implies whenever the user interacts with the webpage. Javascript has made this event-driven process very simple and efficient for its users, making it the number one scripting language used today.
HI Madeline, I really like how you described why JavaScript is “event-driven”. I completely agree that it is always waiting for the user to tell it what to do. It is also a great argument into people who may say that computers are self-intelligent, when in reality, they need to be told what to do in order to function!
Your use of examples to describe Javascript as an interactive language was particularly helpful. It helped me understand how various actions like typing on a keyboard, submitting a form, or refreshing a screen prompt the program to execute a particular code. Thanks to your post, I can now better understand and appreciate the significance of Javascript’s event-driven nature.