Skip to content

Instantly share code, notes, and snippets.

View alexhmontgomery's full-sized avatar

Alex Montgomery alexhmontgomery

View GitHub Profile
@alexhmontgomery
alexhmontgomery / script.js
Created July 18, 2017 21:14
Classes-cars-project
// CLASSES PROJECT
// In this project, you will build a Mazda car factory that manufactures both cars and trucks.
// Read each set of instructions carefully!
// BUILD YOUR FACTORY!
// DECLARE A FACTORY CLASS
// All automobiles manufacutered should have the following properties: make (Mazda), location (USA), airbags (true), abs (true), warranty (60,000 miles / 3 years)
// This factory should also run two functions: massBuild() and customerBuild()
@alexhmontgomery
alexhmontgomery / main.js
Created July 18, 2017 01:25
Constructor assignment
// ###################################################################
// __
// ____/ /___ ____ ______
// / __ / __ \/ __ `/ ___/
// / /_/ / /_/ / /_/ (__ )
// \__,_/\____/\__, /____/
// /____/
// Dog Constructor & Prototype
function Dog (status, color, hungry) {
@alexhmontgomery
alexhmontgomery / todo.sql
Created June 27, 2017 20:21
SQL file to perform tasks on todolist database
create table todos (
id serial primary key,
title varchar(255) not null,
details text,
priority integer not null default 1,
created_at timestamp not null,
completed_at timestamp
);
insert into todos (title, details, priority, created_at)
@alexhmontgomery
alexhmontgomery / main.js
Created June 7, 2017 21:06
Arrays and Loops
// 1.
// Without logging the values, list the value of `sports` and `total`
var sports = ['soccer', 'baseball'];
var total = sports.push('football', 'swimming');
// A:
// sports = ['soccer', 'baseball', 'football', 'swimming']
// total = 4
// 2.
@alexhmontgomery
alexhmontgomery / main.js
Created June 6, 2017 18:51
Javascript Functions and Complex Expressions
// 1.
// Define a function max() that takes two numbers as arguments and returns the largest of them. Use the if-then-else construct available in JavaScript.
// A:
function max(numOne, numTwo){
if(numOne > numTwo) {
return numOne;
} else {
return numTwo;
}
@alexhmontgomery
alexhmontgomery / main.js
Created June 5, 2017 18:53
Intro to JavaScript Assessment
// Answer the following questions in this file using comments without running the code
// 1.
// What does `givenName` equal right now?
var givenName;
// A:
// undefined
// 2.
// What is `givenName` set to right now?
@alexhmontgomery
alexhmontgomery / style.css
Created May 30, 2017 18:31
Responsive Page Layout Build
/*
COLORS
Pink : #ffdddd
Purple : #ddddff
Green : #ddffdd
Blue : #ddffff
Yellow : #ffffdd
@alexhmontgomery
alexhmontgomery / main.css
Last active May 25, 2017 23:12
CSS Layouts & Fonts
* {
box-sizing: border-box;
margin: 0 auto;
}
img {
max-width: 100%;
}
@alexhmontgomery
alexhmontgomery / style.css
Created May 25, 2017 22:44
Puppy Love Project
/*
font info:
family - Helvetica, Arial, sans-serif
line-height - 1.6
colors:
light gray - ##eee
gray - #dddddd
yellow - #ffd24a
@alexhmontgomery
alexhmontgomery / main.css
Created May 25, 2017 20:56
CSS Layout and Flexbox Assignment
*, *:before, *:after {
box-sizing: border-box;
}
* {
margin: 0 auto;
padding: 0;
border: 0;
outline: 0;