JavaScript Tutorial – Editors

What Is The Best JavaScript Editor

Much like HTML, you do not need any fancy editor to code JavaScript, all you need is a text editor. We recommend you to start with a simple text editor like Notepad (Windows) or TextEdit (MacOS).

How to Write JavaScript With Text Editor

Follow the 4 steps below to create your first JavaScript code with a text editor.

1

Open The Text Editor of Your Choice

If you are a Windows user, open Notepad. If you are on MacOS, then open TextEdit.

2

Write Your First JavaScript

Type or copy the following JavaScript into the text editor.


<html>
	<head>
		<script>
			document.write("Hello World!");
		</script>
	</head>
	<body>
	</body>
</html>;

3

Save Text File HTML Page

Save the html file onto your computer. You can save it as .html or .htm.

How to use text editor as JavaScript editor
4

Open HTML File With a Browser

You can view HTML page with any browser you like. Right click on the saved HTML file and choose Open With, select any browser you want to use to view the HTML page.

How to Learn JavaScript Using Online JavaScript Editor

Our free online JavaScript editor allows you to edit JavaScript code and see the result in the same browser window. This is the best tool to learn JavaScript as a beginner, you will be able to write and test your JavaScript code faster.


<script>
	document.write("Hello World!");
</script>