Computer >> Computer tutorials >  >> Programming >> Javascript

How to determine if JavaScript object is an event?


JavaScript is designed on a simple object based paradigm. An object is a collection of properties and a property is an associated with a name and a value .A property’s value can be a function, in which case the property is known as a method. On the other hand HTML events are “things” that happen to HTML elements .When JavaScript is used in HTML pages, JavaScript can “react” on these events.

A JavaScript can be executed when an event occurs, like when user clicks on a HTML elements to execute corresponding code and add JavaScript code to HTML event attribute.