Getting Started With JavaScript In Visual Studio Code

Getting Started With JavaScript In Visual Studio Code

In this quick tutorial, we’ll be getting started with JavaScript In visual Studio code. So get started as quickly as possible. The first thing you need to write a javascript code is a code editor or an IDE.

We can also use the browser’s console but it is only good for writing some short JavaScript code snippet. to getting started JS with Visual studio code we have to first install it. to install vs code just go though this link and download Visual Studio code.

After installing VS code just open it and install these very useful extensions which I have mentioned below.

  • JavaScript (ES6) code snippets
  • Live Server

To install any extension in VS code just follow these 3 steps:

Getting Started With JavaScript In Visual Studio Code - papaprogrammer

Now we’re ready to write our first hello world program. Currently, we’re not creating any external .js file, which stands for JavaScript file. Just write JavaScript in an HTML file.

Now, let’s move further and create a new HTML file named index.html

We gonna use an inbuilt JavaScript function called alert(). The alert() method displays an alert box with a specified message and an OK button. If you don’t know what are the functions then don’t worry, we’ll cover it later on.

<html lang="en">
<body>

</body>
<script>
    alert('Hello World');
</script>

</html>

The output will be,

Getting Started With JavaScript In Visual Studio Code - papaprogrammer

Play around with this alert box with some new text.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like