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

Inside a function, the := short assignment statement can be used in place of the short var declaration.

(Outside a function, every construct begins with a keyword and the := construct is not available.)

===

Why is that? I would find that frustrating and inconsistent.



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

Search: