Python Loop Over String Javascript Mdn