var a = (function *() {})(); var b = undefined; var c = null; var d = {next: () => ({value: 1, done: false})};
{"ScriptPreparationCode":"var a = (function *() {})();\r\nvar b = undefined;\r\nvar c = null;\r\nvar d = {next: () =\u003E ({value: 1, done: false})};\r\nvar values = [a, b, c, d];","TestCases":[{"Name":"null check with next typeof check","Code":"for (const value of values) {\r\n if (value != null \u0026\u0026 typeof value.next === \u0022function\u0022) {\r\n }\r\n}","IsDeferred":false},{"Name":"boolean check with next typeof check","Code":"for (const value of values) {\r\n if (value \u0026\u0026 typeof value.next === \u0022function\u0022) {\r\n }\r\n}","IsDeferred":false},{"Name":"boolean check with next boolean check","Code":"for (const value of values) {\r\n if (value \u0026\u0026 value.next) {\r\n }\r\n}","IsDeferred":false},{"Name":"null or undefined with next typeof check","Code":"for (const value of values) {\r\n if (value !== undefined \u0026\u0026 value !== null \u0026\u0026 typeof value.next === \u0022function\u0022) {\r\n }\r\n}","IsDeferred":false},{"Name":"null or undefined with boolean next check","Code":"for (const value of values) {\r\n if (value !== undefined \u0026\u0026 value !== null \u0026\u0026 value.next) {\r\n }\r\n}","IsDeferred":false}]}