Create Random String Javascript Substring Until Character