chromium/third_party/blink/web_tests/inspector-protocol/resources/console-log-navigate.html

<script>
function navigateOnce()
{
  let ran = false;
  return function() {
    if (ran)
      return; 
    ran = true;
    anchor = document.createElement("a");
    anchor.href = "about:blank";
    anchor.click();
  }
}

function logArray()
{
    array = [];
    array.__defineGetter__(0, navigateOnce());
    console.log(array);
}

function logDate()
{
    var a = new Date();
    a.toString = navigateOnce();
    console.log(a);
}

function logDateWithArg()
{
    var a = new Date();
    a.toString = navigateOnce();
    console.log(42, a);
}
</script>