4 ms·
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 keyw
by sigzero 15y ago
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.