{"ScriptPreparationCode":"var arr = [1,2,3];\r\nvar notArr = null;","TestCases":[{"Name":"IsArray","Code":"const a = Array.isArray(arr) \u0026\u0026 arr.length \u003E 0;\r\nconst b = Array.isArray(notArr) \u0026\u0026 notArr.length \u003E 0;","IsDeferred":false},{"Name":"typecheck (nullable dot) (array)","Code":"const a = arr?.length \u003E 0 \u0026\u0026 arr[0] !== undefined;\r\nconst b = notArr?.length \u003E 0 \u0026\u0026 notArr[0] !== undefined;","IsDeferred":false},{"Name":"manual check cond","Code":"const a = arr !== null \u0026\u0026 arr !== undefined \u0026\u0026 arr.length \u003E 0 \u0026\u0026 arr[0] !== undefined;\r\nconst b = notArr !== null \u0026\u0026 notArr !== undefined \u0026\u0026 notArr.length \u003E 0 \u0026\u0026 notArr[0] !== undefined;","IsDeferred":false},{"Name":"typeof obj \u002B length","Code":"const a = typeof arr === \u0027object\u0027 \u0026\u0026 arr !== null \u0026\u0026 arr.length \u003E 0 \u0026\u0026 arr[0] !== undefined;\r\nconst b = typeof notArr === \u0027object\u0027 \u0026\u0026 notArr !== null \u0026\u0026 notArr.length \u003E 0 \u0026\u0026 notArr[0] !== undefined;","IsDeferred":false},{"Name":"manual check with null-coalescing","Code":"const a = (arr ?? []).length \u003E 0 \u0026\u0026 arr[0] !== undefined;\r\nconst b = (notArr ?? []).length \u003E 0 \u0026\u0026 notArr[0] !== undefined;","IsDeferred":false}]}