Skip to content

Instantly share code, notes, and snippets.

View maxmatthews's full-sized avatar

Max Matthews maxmatthews

View GitHub Profile
@maxmatthews
maxmatthews / schools.js
Created November 16, 2022 17:19
schools.js data and questions
const schools = [
{
type: "elementary",
teachers: [
{
name: "Mr. Smith",
class: "Pirate History",
students: [
"Toya Whitebeard",
"Snooty Helge",
@maxmatthews
maxmatthews / index.html
Last active December 19, 2022 20:14
Wow Project
<!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>
@maxmatthews
maxmatthews / index.html
Created May 25, 2022 17:14
Tic Tac Toe D1
<!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">
@maxmatthews
maxmatthews / index.html
Last active May 26, 2022 00:25
Tic Tac Toe
<!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>
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("")) {
@maxmatthews
maxmatthews / schools.js
Created May 12, 2022 21:05
Nested Data
const schools = [
{
type: "elementary",
teachers: [
{
name: "Mr. Smith",
class: "Pirate History",
students: [
"Toya Whitebeard",
"Snooty Helge",
@maxmatthews
maxmatthews / tip-script.js
Last active May 12, 2022 21:07
Browser Tip Calculator
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);
@maxmatthews
maxmatthews / tip.js
Created May 12, 2022 20:35
Tip Calculator Terminal
const prompts = require("prompts");
(async () => {
let keepRunning = true;
while (keepRunning) {
const answers = await prompts([
{
name: "total",
type: "number",
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
const myTarotCards = [
//This is the info for my first deck of cards
{
deck: "Traditional",
categories: [
{
category: "Air",
characteristics: ["whitty", "intellectual", "detached", "sharp"],
},
{