Added javascript solution

Added javascript solution