JavaScript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

JavaScript

How do you run the code in the notepad++. I wrote the code but i can’t run it

16th Dec 2017, 4:24 AM
Max gk
Max gk - avatar
4 Answers
+ 13
You can actually run your script on Chrome. Not sure if this is what people usually do though. https://developers.google.com/web/tools/chrome-devtools/console/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3#opening_the_console
16th Dec 2017, 4:29 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
As HTML, CSS and JS are parts of web development, they are rendered by web browsers. No need to install other apps to run your code
16th Dec 2017, 4:57 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 3
To run JavaScript code using notepad++ you need to link it to an Html file then run the Html file. Or maybe enclose the entire code inside <script> tags then try to run it on chrome.
16th Dec 2017, 5:00 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 3
Use this template <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <script> // your Javascript code here </script> </body> </html> Copy to Notepad++ Add your JavaScript codes. Save the file as index.html, Open the html file from any browsers or double click the file to open it on default browser.
16th Dec 2017, 5:02 AM
Calviղ
Calviղ - avatar