34 lines
989 B
HTML
Executable File
34 lines
989 B
HTML
Executable File
<!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> |