Source code
Revision control
Copy as Markdown
Other Tools
function checkValues() {
  const a = "";
  const b = false;
  const c = undefined;
  const d = null;
  const e = [];
  const f = {};
  const reg = /^\p{RGI_Emoji}$/v;
  const obj = {
    foo: 1,
  };
  let bs = [];
  for (let i = 0; i <= 100; i++) {
    bs.push({ a: 2, b: { c: 3 } });
  }
  debugger;
}
function columnWise() {
  let a = "a";
  let b = "b";
  let c = "c";
  console.log(c, a, b);
  debugger;
}
function objectProperties() {
  const obj = { hello: "world", a: { b: "c" } };
  console.log(obj.hello);
  console.log(obj.a.b);
  debugger;
}
function classProperties() {
  class Foo {
    x = 1;
    #privateVar = 2;
    #privateMethod() {
      return this.#privateVar;
    }
    breakFn() {
      let i = this.x * this.#privateVar;
      const self = this;
      debugger;
    }
  }
  const foo = new Foo();
  foo.breakFn();
}
function btnClick() {
  const btn = document.querySelector("button");
  debugger;
  btn.click();
}
function onBtnClick(event) {
  debugger;
}
{
  const x = 1;
  {
    const x = 2;
    debugger;
  }
  const dict = {};
  const key = "hello";
  dict[key] = "world";
  debugger;
}
function protoArg(__proto__) {
  debugger;
}
function protoVar() {
  const __proto__ = "lemon";
  debugger;
}
// Test case to help assert that same binding in two different scope
// does not show duplicate inline previews.
// The func declaration `foo` will get hoisted (in non strict mode),
// so it'll be available in both the block scope and the parnet function
// scope.
function innerBlockHoistedFuncDecl() {
  {
    function foo() {
      console.trace();
    }
    foo();
    debugger;
  }
}