Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Synchronous I/O Considered Harmful" or "I once considered teaching JavaScript as a first language, but then I found out it has no GOTO statements"


It may not have GOTO statements, but JavaScript (ECMA-262 Ed. 3) does have its cousin, label-breaks,

  foo:
  if (1) {
    break foo;
    console.log("nope");
  }
  console.log("yep");
https://developer.mozilla.org/en/JavaScript/Reference/Statem...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: