Matlab For Loop Over String Javascript Program Interview