Accessing values in js using main.js

pull/720/head
Norman Harold Bernales 3 years ago
parent fe956a5c62
commit 0ae1188276

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>30DaysOfJavaScript</title>
</head>
<body>
<h1>30DaysOfJavaScript:03 Day</h1>
<h2>Introduction</h2>
<button onclick="alert('Welcome to 30DaysOfJavaScript!');">Click Me</button>
<script src="./helloworld.js"></script>
<script src="./introduction.js"></script>
<script src="./variable.js"></script>
<script src="./main.js"></script>
</body>
</html>

@ -1,4 +0,0 @@
// the variable values can be accessed from other variable.js file
console.log(firstName, lastName, country, city, age, isMarried)
console.log(gravity, boilingPoint, PI) // 9.81, 100, 3.14
console.log(name, job, live)

@ -8,9 +8,9 @@
<script src="helloworld.js" ></script>
<script src="introduction.js"></script>
<script src="variable.js"></script>
<script src="main.js"></script>
</head>
<body>
<h1>Javascript Day 1</h1>
</body>
</html>

@ -0,0 +1,5 @@
//The variable values can be accessed from other js file.
console.log(firstName, lastName, country, city, age, single);
console.log(gravity, boilingPoint, PI); //Output 9.81, 100, 3.14.
console.log(name, job, live); //Output Kyrie, Player, Australia.
Loading…
Cancel
Save