-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlecture4.html
45 lines (44 loc) · 1.68 KB
/
lecture4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lecture 4 | How to run Javascript using NodeJS |</title>
</head>
<body>
<div>*****************************Tutorial Start 🔥 ********************************</div></br></br>
<h1>1. How to Install and Download Node.Js </h1>
<answer>Download Node.Js here<a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a></answer></br>
<h1>2. Node.js Code Practice:1</h1>
<answer>Run and Test your javascript code on outside of browsers by using node.js on command shell or powershell both:</answer>
<script>
// C:\Users\adarsh>node
// Welcome to Node.js v14.7.0.
// Type ".help" for more information.
// > var x=45
// undefined
// > var y=36
// undefined
// > var sum=x+y
// undefined
// >
// > console.log(sum)
// 81
// undefined
// >
</script>
<answer>But the alert function are not run on command shell message show "uncaught type error: alert is not defined" because command shell are not showing windows.</answer>
<h3>Type .help on command shell for more information what you can do on shell.</h3>
<h1>Node.js Code Practice:2</h1>
<script src="lecture4.js"></script>
<answer>Run and Test your javascript code on outside of browsers by using node.js on command shell or poweshell both:</answer></br>
<script>
// D:\JavaScript-Tutorial-Crash-Course>node lecture4.js
// This is my file
// sum of x and y is 120
// Thankyou for you time....!!!
</script>
<div>*****************************Tutorial End 🚀 ********************************</div>
</body>
</html>