{"ScriptPreparationCode":"// Array to hold the generated user data\r\nvar users = [];\r\n\r\n// Function to generate random user data\r\nfunction generateUserData() {\r\n const names = [\u0027John\u0027, \u0027Jane\u0027, \u0027Mike\u0027, \u0027Emily\u0027, \u0027David\u0027, \u0027Sarah\u0027, \u0027Chris\u0027, \u0027Jessica\u0027, \u0027Mark\u0027, \u0027Lisa\u0027];\r\n const lastNames = [\u0027Smith\u0027, \u0027Johnson\u0027, \u0027Williams\u0027, \u0027Brown\u0027, \u0027Jones\u0027, \u0027Miller\u0027, \u0027Davis\u0027, \u0027Garcia\u0027, \u0027Rodriguez\u0027, \u0027Wilson\u0027];\r\n const cities = [\u0027New York\u0027, \u0027Los Angeles\u0027, \u0027Chicago\u0027, \u0027Houston\u0027, \u0027Phoenix\u0027, \u0027Philadelphia\u0027, \u0027San Antonio\u0027, \u0027San Diego\u0027, \u0027Dallas\u0027, \u0027San Jose\u0027];\r\n \r\n const name = names[Math.floor(Math.random() * names.length)];\r\n const lastName = lastNames[Math.floor(Math.random() * lastNames.length)];\r\n const age = Math.floor(Math.random() * 60) \u002B 18; // Random age between 18 and 77\r\n const city = cities[Math.floor(Math.random() * cities.length)];\r\n \r\n return {\r\n name,\r\n lastName,\r\n age,\r\n city,\r\n };\r\n}\r\n\r\nfor (let i = 0; i \u003C 500; i\u002B\u002B) {\r\n const user = generateUserData();\r\n users.push(user);\r\n}","TestCases":[{"Name":"indexOf","Code":"const usersInSanCities = users.filter(user =\u003E user.city.indexOf(\u0027San\u0027) === 0)","IsDeferred":false},{"Name":"startsWith","Code":"const usersInSanCities = users.filter(user =\u003E user.city.startsWith(\u0027San\u0027))","IsDeferred":false}]}