{"ScriptPreparationCode":"var dateList = [];\r\nvar currentDateTime = Date.now();\r\nfor (i = 0; i \u003C 10000; i\u002B\u002B) {\r\n var randomInt = Math.round(Math.random()); // This will randomly returns either 0 or 1.\r\n if (randomInt === 0) {\r\n dateList.push(null); // Fill the array with a null value.\r\n } else {\r\n dateList.push(addMinutes(currentDateTime, i)); // This will fill up the array with date objects.\r\n }\r\n}\r\n\r\nfunction addMinutes(dt, minutes) {\r\n return new Date(dt \u002B minutes * 60000);\r\n}","TestCases":[{"Name":"Check with regular comparison","Code":"var counter = 0;\r\nfor (i = 0; i \u003C 10000; i\u002B\u002B) {\r\n if (!!dateList[i]) {\r\n counter\u002B\u002B;\r\n }\r\n}","IsDeferred":false},{"Name":"Check using instanceof comparison","Code":"var counter = 0;\r\nfor (i = 0; i \u003C 10000; i\u002B\u002B) {\r\n if (dateList[i] instanceof Date) {\r\n counter\u002B\u002B;\r\n } \r\n}","IsDeferred":false},{"Name":"Check using regular and instanceof comparison","Code":"var counter = 0;\r\nfor (i = 0; i \u003C 10000; i\u002B\u002B) {\r\n if (!!dateList[i] \u0026\u0026 dateList[i] instanceof Date) {\r\n counter\u002B\u002B;\r\n } \r\n}","IsDeferred":false}]}