I have an array in JavaScript that have defined these values:
var myStringArray = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\"];
function* employeeNames(){ var empList = ["1","2","3","4","5","6","7","8","9","10"]; for(var i =0; i<=empList.length; i++){ yield empList[i]; } } var emp; emp = employeeNames();
It uses a generator function...