First commit
This commit is contained in:
34
Prep 8/load.html
Executable file
34
Prep 8/load.html
Executable file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Nicholas Tamassia - Prep 8 - Load</title>
|
||||
|
||||
<style>
|
||||
/* YOUR STYLE HERE */
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="name-display"></div>
|
||||
<div id="favorite-display"></div>
|
||||
<div id="quotes-display"></div>
|
||||
|
||||
<script>
|
||||
const nameDisplay = document.getElementById('name-display')
|
||||
const favoriteDisplay = document.getElementById('favorite-display')
|
||||
const quotesDisplay = document.getElementById('quotes-display')
|
||||
|
||||
nameDisplay.textContent = localStorage.getItem('fullname')
|
||||
favoriteDisplay.textContent = Number.parseFloat(localStorage.getItem('favnumber')) + 5
|
||||
|
||||
JSON.parse(localStorage.getItem('quotes')).forEach((quote) => {
|
||||
const listItem = document.createElement('li')
|
||||
listItem.textContent = quote
|
||||
quotesDisplay.appendChild(listItem)
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user