JS Algorithms

Some basic JavaScript algorithms inspired by FreeCodeCamp.com