Javascript is a most popular Programming language in the world.
In the starting, JavaScript was used for web browser to build the attractive web pages.
After Node came it is used for Web and mobile App, Real time Networking Application like real chat, etc.
Where JavaScript run?
1) Javascript code write into the script tag.
Syntax:-
<script>
// write code
</script>
Write the code into the script tag
<script>
document.write("Hello JavaScript");
</script>
It will show on the browser page.
Output:- Hello JavaScript
2) You can javascript run on the browser console.
> console.log("Hello JavaScript");
Output:- Hello JavaScript
Add two numeric value
<script>
document.write(2+2);
</script>
Output:- 4
Add two string
<script>
document.write("Welcome"+" John");
</script>
Output:- Welcome John