Javascript Code For Taking Input Using Map