1. Two ways of using JS on client: ๐Ÿค“

๐Ÿ‘‰In the HTML file,

<head>
<script>
console.log("Hello world")
</script>
</head>
<body>
<h1>Text</h1>
</body>

๐Ÿ‘‰Creating JS file and then in HTML we link it.

HTML file ๐Ÿ‘‡

<script src="app.js" type="text/javascript"></script>

JavaScript file(for example we name it as app.js) ๐Ÿ‘‡

console.log("Hello world")

2. All about Alert and Prompt: ๐Ÿค“

๐Ÿ‘‰Alert and Prompt are popup boxes in JavaScript.

๐Ÿ‘‰Before user enters the page,If you want user to take input then we use prompt.

Prompt:

var userName = prompt("East or west,neoG is the best");
console.log(userName);

๐Ÿ‘‰If you want to give user an important note before he/she enters the page,we use alert.

Alert:

alert("Hello world")

3. VanillaJS: ๐Ÿค“

๐Ÿ‘‰It is the purest form,Plain form of JavaScript in which we do not use any frameworks or additional libraries