punctuator `:`
JS ⟩ grammar ⟩ token ⟩ punctuator ⟩ colon (:)
object literal - { <key> : <value> }.
{ <key> : <value> }
conditional operator (?:) - <condition> ? <a> : <b>.
<condition> ? <a> : <b>
label statement - <label> : <statement>.
<label> : <statement>
switch (case clause) - case <expr> : <statements>.
case <expr> : <statements>
Last updated 3 years ago