{"ScriptPreparationCode":"var timeSlots = [\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 0},\r\n {start_date: \u00222020-10-15T19:14:46.599Z\u0022, end_date: \u00222020-10-15T19:14:46.599Z\u0022, id: 1},\r\n];","TestCases":[{"Name":"reduce","Code":"var [ newTimeSlots, editedTimeSlots ] = timeSlots.reduce( (splitSlots, slot ) =\u003E {\r\n var arrayIndex = slot.id \u003E 0 ? 1 : 0;\r\n splitSlots[arrayIndex].push({...slot, meeting: 1}); \r\n return splitSlots;\r\n}, [[], []]);","IsDeferred":false},{"Name":"forEach","Code":"var newTimeSlots = [];\r\nvar editedTimeSlots = [];\r\ntimeSlots.forEach(slot =\u003E {\r\n slot.id \u003E 0 ? editedTimeSlots.push({...slot, meeting: 1}) : newTimeSlots.push({...slot, meeting: 1});\r\n});","IsDeferred":false}]}