Replace Element In String Javascript Program