parent
643f3c452e
commit
4ab196807f
@ -0,0 +1 @@
|
||||
console.log('Hello, World!')
|
@ -0,0 +1,19 @@
|
||||
<!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>
|
@ -0,0 +1 @@
|
||||
console.log('Welcome to 30DaysOfJavaScript')
|
@ -0,0 +1,4 @@
|
||||
// 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)
|
@ -0,0 +1,21 @@
|
||||
// Declaring different variables of different data types
|
||||
|
||||
let firstName = 'Asabeneh' // first name of a person
|
||||
let lastName = 'Yetayeh' // last name of a person
|
||||
let country = 'Finland' // country
|
||||
let city = 'Helsinki' // capital city
|
||||
let age = 100 // age in years
|
||||
let isMarried = true
|
||||
|
||||
// Declaring variables with number values
|
||||
|
||||
const gravity = 9.81 // earth gravity in m/s2
|
||||
const boilingPoint = 100 // water boiling point, temperature in oC
|
||||
const PI = 3.14 // geometrical constant
|
||||
|
||||
// Variables can also be declaring in one line separated by comma
|
||||
|
||||
let name = 'Asabeneh', //name of a person
|
||||
job = 'teacher',
|
||||
live = 'Finland'
|
||||
|
@ -0,0 +1,20 @@
|
||||
// Declaring different variables of different data types
|
||||
|
||||
let firstName = 'Asabeneh' // first name of a person
|
||||
let lastName = 'Yetayeh' // last name of a person
|
||||
let country = 'Finland' // country
|
||||
let city = 'Helsinki' // capital city
|
||||
let age = 100 // age in years
|
||||
let isMarried = true
|
||||
|
||||
// Declaring variables with number values
|
||||
|
||||
const gravity = 9.81 // earth gravity in m/s2
|
||||
const boilingPoint = 100 // water boiling point, temperature in oC
|
||||
const PI = 3.14 // geometrical constant
|
||||
|
||||
// Variables can also be declaring in one line separated by comma
|
||||
|
||||
let name = 'Asabeneh', //name of a person
|
||||
job = 'teacher',
|
||||
live = 'Finland'
|
Loading…
Reference in new issue