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

I think I might have explained myself poorly. I'm suggesting using separate var statements for each assignment, e.g.:

var a = 2; var b = 4; var c = { blah: "whatever" };

Leaving out a semicolon has no effect. They can be copied without any fuss. It's easy.



Problems with semi-colons usually arise in object usage. So your solution is very specific.

    x = {[
      { id: 1, data: 0 },
      { id: 2, data: 0 }
    ],
    [
      { id: 3, data: 0 },
      { id: 4, data: 0 }
    ]}




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: