Getting Input In Javascript From Array To String