Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Java by (9.5k points)

Can anyone tell me how can I type a JavaScript game on textmate on the MacOs to have a regular .js file and run it in chrome to say just “Hello World!”?

1 Answer

0 votes
by (19.7k points)

You have to create a text file with .html extension then put a JavaScript file in the same folder. Then write your HTML scripts like below: 

<html>

    <head>

        <script src="game.js"></script>

    </head>

</html>

 Double click on that file in the finder, and it should open it up in your browser.

Interested in Java? Check out this Java Certification by Intellipaat.   

Related questions

0 votes
1 answer
0 votes
1 answer
asked Apr 23, 2021 in Java by sheela_singh (9.5k points)

Browse Categories

...