This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schools = [ | |
{ | |
type: "elementary", | |
teachers: [ | |
{ | |
name: "Mr. Smith", | |
class: "Pirate History", | |
students: [ | |
"Toya Whitebeard", | |
"Snooty Helge", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Document</title> | |
</head> | |
<body> | |
<div id="movieData"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Tic Tac Toe</title> | |
</head> | |
<body> | |
<div id="container"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta | |
name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | |
/> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function palindrome(str) { | |
str = str | |
.replace(/[\s\.\,_-]/g, "") | |
.toLowerCase() | |
.replace("/", "") | |
.replace(":", "") | |
.replace("(", "") | |
.replace(")", ""); | |
console.log(str, str.split("").reverse().join("")); | |
if (str === str.split("").reverse().join("")) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schools = [ | |
{ | |
type: "elementary", | |
teachers: [ | |
{ | |
name: "Mr. Smith", | |
class: "Pirate History", | |
students: [ | |
"Toya Whitebeard", | |
"Snooty Helge", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("calculateButton").onclick = () => { | |
const totalInput = document.getElementById("total"); | |
const tipInput = document.getElementById("tip"); | |
console.log(typeof totalInput.value); | |
console.log(typeof tipInput.value); | |
const total = parseFloat(totalInput.value); | |
const tip = parseInt(tipInput.value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const prompts = require("prompts"); | |
(async () => { | |
let keepRunning = true; | |
while (keepRunning) { | |
const answers = await prompts([ | |
{ | |
name: "total", | |
type: "number", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toDoList = [ | |
{ name: "Import Export homework", status: "done", daysLeftToDo: 1 }, | |
{ name: "Array homework", status: "in progress", daysLeftToDo: 1 }, | |
{ name: "Chat App homework", status: "in progress", daysLeftToDo: 1 }, | |
{ name: "Add to Capstone website", status: "to do", daysLeftToDo: 2 }, | |
{ name: "Finish Resume", status: "in progress", daysLeftToDo: 3 }, | |
]; | |
const priorityTasks2 = toDoList.filter( | |
(task) => task.status !== "done" && task.daysLeftToDo < 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myTarotCards = [ | |
//This is the info for my first deck of cards | |
{ | |
deck: "Traditional", | |
categories: [ | |
{ | |
category: "Air", | |
characteristics: ["whitty", "intellectual", "detached", "sharp"], | |
}, | |
{ |
NewerOlder