Skip to content

Instantly share code, notes, and snippets.

View faithgaiciumia's full-sized avatar
💭
online

Faith Gaiciumia Kamencu faithgaiciumia

💭
online
View GitHub Profile
function humanize(num){
var ones = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine',
'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen',
'seventeen', 'eighteen', 'nineteen'];
var tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty',
'ninety'];
var numString = num.toString();
if (num < 0) throw new Error('Negative numbers are not supported.');
var car = "audi";
(function (make) {
return make;
})(car);
(()=>{
//do something
})();
( function () {
//do something
}
)();
var user = (
function (){
var name = "faith";
return name;
}
)();
name; //faith
@faithgaiciumia
faithgaiciumia / completedApp.js
Created June 29, 2020 21:42
Complete app.js
const quotes = [
{ quote: "You're only as sick as your secrets.", author: "Anonymous" },
{
quote: "To remain young one must change.",
author: "Alexander Chase",
},
{
quote:
"Those who seek happiness miss it, and those who discuss it, lack it.",
author: "Holbrook Jackson",
function generateQuote() {
var randomIndex = Math.floor(Math.random()*quotes.length);
document.getElementById("quote").innerHTML=quotes[randomIndex].quote;
document.getElementById("author").innerHTML="~"+ " " + quotes[randomIndex].author;
}
(function () {
const quotes = [
{ quote: "You're only as sick as your secrets.", author: "Anonymous" },
{
quote: "To remain young one must change.",
author: "Alexander Chase",
},
{
quote:
"Those who seek happiness miss it, and those who discuss it, lack it.",
(function(){}());
html {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #2d3436;
background-image: linear-gradient(315deg, #2d3436 0%, #000000 74%);
}
#quote-box {
width: 60vw;