Smart Interview Basic Hackerrank Javascript Test