parent
9504d35445
commit
8d1046abe0
@ -0,0 +1,21 @@
|
|||||||
|
//5. Create datatypes.js file and use the JavaScript typeof operator to check different data types. Check the data type of each variable
|
||||||
|
console.log(typeof Name)
|
||||||
|
console.log(typeof human)
|
||||||
|
console.log(typeof x)
|
||||||
|
console.log(typeof Null)
|
||||||
|
//6. Declare four variables without assigning values
|
||||||
|
let a
|
||||||
|
let b
|
||||||
|
let c
|
||||||
|
let d
|
||||||
|
//7. Declare four variables without assigning values
|
||||||
|
const one = 1
|
||||||
|
const two = 2
|
||||||
|
const three = 3
|
||||||
|
const four = 4
|
||||||
|
//8. Declare variables to store your first name, last name, marital status, country and age in multiple lines
|
||||||
|
let FirstName = "kevin"
|
||||||
|
let LastName = "H"
|
||||||
|
let MaritalStatus = "single"
|
||||||
|
let country = "USA"
|
||||||
|
let age = 24
|
@ -0,0 +1,10 @@
|
|||||||
|
console.log("Hello, World!")
|
||||||
|
//1. Write a single line comment which says, comments can make code readable
|
||||||
|
//comments can make code readable
|
||||||
|
|
||||||
|
//2. Write another single comment which says, Welcome to 30DaysOfJavaScript
|
||||||
|
//Welcome to 30DaysOfjavaScript
|
||||||
|
|
||||||
|
//3. Write a multiline comment which says, comments can make code readable, easy to reuse and informative
|
||||||
|
/*comments can make code Readable,
|
||||||
|
easy to reuse and informative*/
|
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Multiple External Scripts</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
//
|
||||||
|
<script src="./helloworld.js"></script>
|
||||||
|
<script src="./introduction.js"></script>
|
||||||
|
<script src="./variable.js"></script>
|
||||||
|
<script src="./datatypes.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1 @@
|
|||||||
|
console.log('Welcome to 30DaysOfJavaScript')
|
@ -0,0 +1,13 @@
|
|||||||
|
//4. Create a variable.js file and declare variables and assign string, boolean, undefined and null data types
|
||||||
|
let Name = "kevin"
|
||||||
|
let human = true
|
||||||
|
let x
|
||||||
|
let Null = null
|
||||||
|
|
||||||
|
//9.Declare variables to store your first name, last name, marital status, country and age in a single line
|
||||||
|
let FirstName1 = "kevin", LastName1 = "H", MaritalStatus1 = "single", country1 = "USA", age1 = 24
|
||||||
|
|
||||||
|
//10.Declare two variables myAge and yourAge and assign them initial values and log to the browser console.
|
||||||
|
let myAge = 24
|
||||||
|
let yourAge = 21
|
||||||
|
console.log(myAge,yourAge)
|
Loading…
Reference in new issue