The following are three methods for adding JavaScript to HTML pages:
Code embedding.
Code inline
External document.
A web browser and either a text editor or an HTML editor are required to write JavaScript. After you've installed the software, you may start developing JavaScript code. Create or open an HTML file with your text/HTML editor to add JavaScript code to it.
Share a personalized message with your friends.