added more javascript solutions