You need a browser and text editor. I use Firefox for browser and Notepad++ as a text editor. Instead alert you can use document. write.
No, you dont need any special software for this. All you need is a notepad or any other text editor and to view/run the code you need browser atleast version 3 and above.
- Open Notepad by pressing Window+R from your PC.
- Press ctrl+S to save the file in your system.
- After pressing ctrl+S it will ask for the name of your file.
- Give a name of the file with . JS extension i.e. “hello. js”.
- Open Chrome on your computer.
- Click. Settings.
- Click Privacy and security.
- Click Site settings.
- Turn on Allowed (recommended).
To try it:
- Open the Console. For example, press Control + Shift + J (Windows, Linux) or Command + Option + J (macOS).
- Click on the “apps” option on your phone. Select the “Browser” option.
- Click the menu button in the browser. Select “Settings” (located towards the bottom of the menu screen).
- Select “Advanced” from the Settings screen.