JavaScript for Algorithms