Skip to content

Instantly share code, notes, and snippets.


Matt Brannon mattbrannon

View GitHub Profile
View .eslintrc.json
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
"extends": [
mattbrannon / gist:ad1819031d8e59d93e6333d7ab2196c1
Last active Oct 18, 2018
Functional class, Prototypal class, Pseudoclassical class
View gist:ad1819031d8e59d93e6333d7ab2196c1
// Functional class //
const Dog = function(name, breed, age){
var dog = {
name: name,
breed: breed,
age: age,
happiness: 50,
View problemSolvingProcess.js
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"
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