0

Please how can i run my visual studio code my JavaScript and test it on chrome?

How to use vs-code to run JavaScript

22nd Jul 2020, 9:42 AM
Chichebe Darlington
Chichebe Darlington - avatar
1 Answer
0
There are two ways to add JavaScript codes and start to type scripts regardless the code editor First : by using script tag whether you include it in head tag or body tag You need to write something like that <Script> <!--your JavaScript code goes here --> </Script> The second way is to create external JavaScript file (and of course it's better than inline script into html file ) you need to create file so what you should do is following these steps as follow From the view panel choose New file and save it as js extension and choose to save it in the same place as your html file exists Then Assume you named your js file as myfirstcode.js Then what you gonna to do is to inline the script tag with source of your js file like that <Script src= "myfirstcode.js"> </script> Finally start to type your scripts and have a fun with writing beneficial scripts 😉😉
22nd Jul 2020, 9:54 AM
ebrahem hesham
ebrahem hesham - avatar