I had followed this guide and installed chrome debugger (non related to the guide) on VS Code - I've modified index.tsx
to contain this code:
function f(s:string) :boolean
{
return s != undefined;
}
function f1()
{
const v : string = String();
if(v) {alert("IF");}
const q = Array<string>(9);
if(!q.every(f)) {alert("BOOLEAN");}
}
f1();
I've set a breakpoint inside f
but it's never triggered. On the other hand is not being marked as grey while debugging. What am I missing?
Any breakpoint inside f1
is being triggered.
Array<string>(9)
creates an array with 9 empty slots, and theevery
method skips empty slots, sof
is never called and a breakpoint set inf
won't be reached.