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
<link href="http://fonts.googleapis.com/css?family=Cardo:400,400italic|Radley|Tangerine" rel="stylesheet"> | |
<h1>Random Quotes Rewritten</h1> | |
<p> These are some of my favorite quotes I had collected during medical school I recently rediscovered via the wayback machine. I hope you enjoy them!</p> | |
<button class=button>New Quote</button> | |
<div class="quote"><span class = "saying"></span><br> | |
<span class= "author"></span></div> | |
<div class=link><a href="http://web.archive.org/web/20020204185254/http://www.pitt.edu/~smast27/">Original Site</a></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
function inventory(arr1, arr2) { | |
// All inventory must be accounted for or you're fired! | |
arr2.forEach(function(a, i1){ | |
var index = -1; | |
arr1.forEach(function(b, i2){ | |
if(b[1] === a [1]){ | |
index = i2; | |
} | |
}); | |
if(index !== -1){ |
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 friendly(str) { | |
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'November', 'December']; | |
var suffix = function(day){ | |
if(day === 1 || day ===21) day += 'st'; | |
else if(day === 2|| day ===22) day += 'nd'; | |
else if(day ===3 || day ===23) day += 'rd'; | |
else day += 'th'; | |
return day; | |
}; |
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 factorilize(num){ | |
var n = 1; | |
for(var i = 2; i <= num; i++){ | |
n *= i; | |
} | |
return n; | |
} | |
var permArr = [], usedChar = []; |
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 telephoneCheck(str) { | |
// Good luck! | |
var valid = false; | |
if(!str.match(/^\([^\(\)]{10}\)$/g)){ | |
if(!str.match(/^\-/g)){ | |
var reg = /[^0-9]/g; | |
str = str.replace(reg, ""); | |
if(str.length ===10){ | |
valid = true; | |
}else if(str.length === 11){ |