Labels
JavaScript allows any statement to have a label, and labels have a separate namespace. JSLint is stricter.
JSLint expects labels only on statements that interact with break
: switch
,
while
, do
,
and for
. JSLint expects that labels will be
distinct from variables and parameters.
Get JavaScript: The Good Parts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.