parent
55d8e3dbc0
commit
577034f2ae
@ -0,0 +1,4 @@
|
|||||||
|
console.log(typeof str);
|
||||||
|
console.log(typeof bool);
|
||||||
|
console.log(typeof val);
|
||||||
|
console.log(typeof valNull);
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
// comments can make code readable
|
||||||
|
|
||||||
|
// Welcome to 30DaysOfJavaScript
|
||||||
|
|
||||||
|
/* comments can make code
|
||||||
|
readable, easy to reuse
|
||||||
|
and informative
|
||||||
|
*/
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Exercise Day1</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script src="variable.js"></script>
|
||||||
|
<script src="datatype.js"></script>
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
let str = "Lavanya";
|
||||||
|
let bool = true;
|
||||||
|
let val;
|
||||||
|
let valNull = null;
|
||||||
|
|
||||||
|
// Declare variables to store your first name, last name, marital status, country and age in multiple lines
|
||||||
|
let fname = "Lavanya";
|
||||||
|
let lname = "Sathya";
|
||||||
|
let maritalStatus = false;
|
||||||
|
let country = "India";
|
||||||
|
let age = 25;
|
||||||
|
|
||||||
|
// Declare variables to store your first name, last name, marital status, country and age in a single line
|
||||||
|
let Fname = "lavanya",
|
||||||
|
Lname = "Sathya",
|
||||||
|
marital = false,
|
||||||
|
Country = "India",
|
||||||
|
Age = 25;
|
||||||
|
|
||||||
|
// Declare two variables myAge and yourAge and assign them initial values and log to the browser console.
|
||||||
|
const myAge = 25;
|
||||||
|
const yourAge = 30;
|
||||||
|
console.log(`I am ${myAge} years old.`);
|
||||||
|
console.log(`You are ${yourAge} years old.`);
|
||||||
Loading…
Reference in new issue