Better HN
topnewbestaskshowjobs
Log inSign up

richgieg

2 karma · joined Mar 12, 2020 (6y ago) · 3 submissions

Submissions

comment 6y ago · link · parent

If that's the case, then wouldn't both "asdf" and "qwer" be printed to the console when executing the following code?

  function test() {
      switch (true) {
          case console.log('asdf') === undefined: return 1;
          case console.log('qwer') === undefined: return 2;
      }
  }
  test();