{"ScriptPreparationCode":"var users = [\r\n { \u0027user\u0027: \u0027joey\u0027, \u0027age\u0027: 32 },\r\n { \u0027user\u0027: \u0027ross\u0027, \u0027age\u0027: 41 },\r\n { \u0027user\u0027: \u0027joey\u0027, \u0027age\u0027: 32 },\r\n { \u0027user\u0027: \u0027ross\u0027, \u0027age\u0027: 41 },\r\n { \u0027user\u0027: \u0027joey\u0027, \u0027age\u0027: 32 },\r\n { \u0027user\u0027: \u0027ross\u0027, \u0027age\u0027: 41 },\r\n { \u0027user\u0027: \u0027joey\u0027, \u0027age\u0027: 32 },\r\n { \u0027user\u0027: \u0027ross\u0027, \u0027age\u0027: 41 },\r\n { \u0027user\u0027: \u0027chandler\u0027, \u0027age\u0027: 39 }\r\n]\r\n\r\n","TestCases":[{"Name":"array find","Code":"// Native\r\nusers.slice().reverse().find(function (o) { return o.age \u003C 40; })","IsDeferred":false},{"Name":"array findlast","Code":"users.slice().findLast(function (o) { return o.age \u003C 40; })","IsDeferred":false},{"Name":"for loop","Code":"let lastItem = undefined;\r\nfor (let i = users.length - 1; i \u003E= 0; i--) {\r\n if (users[i].age \u003C 40) {\r\n lastItem = users[i];\r\n break; // Exit the loop once the item is found\r\n }\r\n}\r\n","IsDeferred":false}]}