You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>30DaysOfJavaScript: Exercises</title>
</head>
<body>
<script>
// Comments can make code readable
// Welcome to 30DaysOfJavaScript
/*
Comments can make code readable,
easy to reuse and informative
*/
</script>
<!--
Make external scripts and use the latter
to print the first one's variables
-->
<script src="variables.js"></script>
<script src="datatypes.js"></script>
<script>
// Declare 4 variables without assigning values
let a, b, c, d
// Declare 4 variables with assigned values
let e = '1',
f = '2',
g = '3',
h = '4'
/*
Declare variables to store your first name,
last name, marital status, country, and age
in multiple lines.
*/
let firstName = 'Dean Harold'
let lastName = 'Abad'
let maritalStatus = 'single'
let country = 'Philippines'
let age = 19
/*
Declare variables to store your first name,
last name, marital status, country, and age
in a single line.
*/
let fn = firstName,
ln = lastName,
ms = maritalStatus,
ct = country,
ag = age
/*
Declare 2 variables myAge and yourAge and assign
them their initial values and log into the
browser console.
*/
let myAge = 19, yourAge = 21
console.log("I am ", myAge, " years old.\nYou are ", yourAge, " years old.")
</script>
</body>
</html>