{"ScriptPreparationCode":"boxType = \u0027STORAGE\u0027;\r\ninspectionPendingBoxCount = 0;\r\nboxList = [\r\n {\r\n \u0027id\u0027: 1,\r\n \u0027boxCode\u0027: \u0027b1\u0027,\r\n \u0027purpose\u0027: \u0027STORAGE\u0027,\r\n \u0027isInspectionReq\u0027: true,\r\n \u0027status\u0027: \u0027INSPECTION_IN_PROGRESS\u0027\r\n },\r\n {\r\n \u0027id\u0027: 2,\r\n \u0027boxCode\u0027: \u0027b2\u0027,\r\n \u0027purpose\u0027: \u0027STORAGE\u0027,\r\n \u0027isInspectionReq\u0027: true,\r\n \u0027status\u0027: \u0027RECEIVED\u0027\r\n },\r\n {\r\n \u0027id\u0027: 3,\r\n \u0027boxCode\u0027: \u0027b3\u0027,\r\n \u0027purpose\u0027: \u0027CROSSDOCK\u0027,\r\n \u0027isInspectionReq\u0027: false,\r\n \u0027status\u0027: \u0027INSPECTION_IN_PROGRESS\u0027\r\n },\r\n {\r\n \u0027id\u0027: 4,\r\n \u0027boxCode\u0027: \u0027b4\u0027,\r\n \u0027purpose\u0027: \u0027STORAGE\u0027,\r\n \u0027isInspectionReq\u0027: true,\r\n \u0027status\u0027: \u0027INSPECTION_DONE\u0027\r\n },\r\n {\r\n \u0027id\u0027: 5,\r\n \u0027boxCode\u0027: \u0027b5\u0027,\r\n \u0027purpose\u0027: \u0027STORAGE\u0027,\r\n \u0027isInspectionReq\u0027: false,\r\n \u0027status\u0027: \u0027INSPECTION_IN_PROGRESS\u0027\r\n }\r\n];","TestCases":[{"Name":"array.filter","Code":"inspectionPendingBoxCount = boxList?.filter(box=\u003E boxType == box?.purpose \u0026\u0026 box?.isInspectionReq \u0026\u0026 (box?.status==\u0027INSPECTION_IN_PROGRESS\u0027 || box?.status==\u0027RECEIVED\u0027))?.length;","IsDeferred":false},{"Name":"for loop","Code":"for(let box of boxList){\r\n if(boxType == box?.purpose \u0026\u0026 box?.isInspectionReq \u0026\u0026 (box?.status==\u0027INSPECTION_IN_PROGRESS\u0027 || box?.status==\u0027RECEIVED\u0027)) inspectionPendingBoxCount\u002B=1;\r\n}","IsDeferred":false},{"Name":"array.filter with array.includes","Code":"inspectionPendingBoxCount = boxList?.filter(box=\u003E boxType == box?.purpose \u0026\u0026 box?.isInspectionReq \u0026\u0026 [\u0027INSPECTION_IN_PROGRESS\u0027, \u0027RECEIVED\u0027].includes?.(box?.status))?.length;","IsDeferred":false}]}