Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
.DS_Store
51 changes: 51 additions & 0 deletions 01-Fundamentals-Part-1/starter/assignments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// JavaScript Fundamentals 1


// Values and Variables

// let country = "United States of America";
// let continent = "North America";
// let population = 340.1;

// console.log(country);
// console.log(continent);
// console.log(population);


// Data Types

// let isIsland = false;
// let language;

// console.log(typeof isIsland);
// console.log(typeof population);
// console.log(typeof country);
// console.log(typeof language);


// let, const, and var

const country = "United States of America";
const continent = "North America";
let population = 340.1;
const isIsland = false;
const language = "English";
// isIsland = true;


// Basic Operators

const halfPopulation = population / 2;
console.log(halfPopulation);

population += 1;
console.log(population);

const populationFinland = 6;
console.log(population > populationFinland);

const averagePopulation = 33;
console.log(population < averagePopulation);

const description = country + " is in " + continent + ", and its " + population + " million people speak " + language
console.log(description);
15 changes: 15 additions & 0 deletions 01-Fundamentals-Part-1/starter/codingChallenges.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// JavaScript Fundamentals Part 1

// Coding Challenge #1
const weightMark = 78;
const heightMark = 1.69;

const weightJohn = 92;
const heightJohn = 1.95;

const bmiMark = weightMark / heightMark ** 2;
const bmiJohn = weightJohn / (heightJohn * heightJohn);

const markHigherBMI = bmiMark > bmiJohn;

console.log(bmiMark, bmiJohn, markHigherBMI);
61 changes: 34 additions & 27 deletions 01-Fundamentals-Part-1/starter/index.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>JavaScript Fundamentals – Part 1</title>
<style>
body {
height: 100vh;
display: flex;
align-items: center;
background: linear-gradient(to top left, #28b487, #7dd56f);
}
h1 {
font-family: sans-serif;
font-size: 50px;
line-height: 1.3;
width: 100%;
padding: 30px;
text-align: center;
color: white;
}
</style>
</head>
<body>
<h1>JavaScript Fundamentals – Part 1</h1>
</body>
</html>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>JavaScript Fundamentals – Part 1</title>
<style>
body {
height: 100vh;
display: flex;
align-items: center;
background: linear-gradient(to top left, #28b487, #7dd56f);
}

h1 {
font-family: sans-serif;
font-size: 50px;
line-height: 1.3;
width: 100%;
padding: 30px;
text-align: center;
color: white;
}
</style>
</head>

<body>
<h1>JavaScript Fundamentals – Part 1</h1>
<script src="script.js"></script>
<script src="assignments.js"></script>
<script src="codingChallenges.js"></script>
</body>

</html>