parent
ff64df9419
commit
3796a45008
@ -0,0 +1,42 @@
|
||||
let favoriteColor = "Blue";
|
||||
let isBoolean = false;
|
||||
let electionDetails;
|
||||
let emptyValue = null;
|
||||
let firstNumber = 0;
|
||||
|
||||
// These are type of each variables
|
||||
console.log(typeof(favoriteColor));
|
||||
console.log(typeof(isBoolean));
|
||||
console.log(typeof(electionDetails));
|
||||
console.log(typeof(emptyValue));
|
||||
console.log(typeof(firstNumber));
|
||||
|
||||
// These are unassigned variables
|
||||
let nameOfMom;
|
||||
let nameOfDad;
|
||||
let nameOfSister;
|
||||
let nameOfBrother;
|
||||
|
||||
// These are assigned variables
|
||||
let currentYear = 2020;
|
||||
let currentMonth = "November";
|
||||
let currentDay = "Tuesday";
|
||||
let isEmployed = false;
|
||||
|
||||
// This is my details in multiple lines
|
||||
let firstName = "Kelechi";
|
||||
let lastName = "Egekenze";
|
||||
let isMarried = false;
|
||||
let country = "Nigeria";
|
||||
let age = 27;
|
||||
|
||||
// This is my details in single line
|
||||
//let firstName = "Kelechi"; let lastName = "Egekenze"; let isMarried = false; let country = "Nigeria"; let age = 27;
|
||||
|
||||
// Console to the browser
|
||||
let myAge = 27;
|
||||
let yourAge = 30;
|
||||
console.log("I am 27 years old");
|
||||
console.log("I am 30 years old");
|
||||
console.log(myAge);
|
||||
console.log(yourAge);
|
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="script.js"></script>
|
||||
<script src="datatypes.js"></script>
|
||||
<script src="variable.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
// Comments can make code readable
|
||||
|
||||
// Welcome to 30DaysOfJavaScript
|
||||
|
||||
/* comments can make code readable,
|
||||
easy to reuse and informative */
|
||||
|
@ -0,0 +1,4 @@
|
||||
let favoriteColor = "Blue";
|
||||
let isBoolean = false;
|
||||
let electionDetails;
|
||||
let emptyValue = null;
|
Loading…
Reference in new issue