Skip to content

Instantly share code, notes, and snippets.

View mattbrannon's full-sized avatar

Matt Brannon mattbrannon

View GitHub Profile
@mattbrannon
mattbrannon / .eslintrc.json
Created June 2, 2020 17:43
eslint config
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"standard"
],
@mattbrannon
mattbrannon / gist:ad1819031d8e59d93e6333d7ab2196c1
Last active October 18, 2018 22:19
Functional class, Prototypal class, Pseudoclassical class
//////////////////////
// Functional class //
//////////////////////
const Dog = function(name, breed, age){
var dog = {
name: name,
breed: breed,
age: age,
happiness: 50,
@mattbrannon
mattbrannon / problemSolvingProcess.js
Created September 25, 2018 18:18
Problem solving process
/*
Write a function that takes a string as input and returns the string reversed.
Do NOT use the native .reverse() method.
reverseString("never") // returns "reven"
Strategy:
Given a string, split the string in an array of characters
Loop backwards through the array starting from the last index
Make a new string by concatenating each character