Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

JavaScript Conditional Snippets

[j.ifelse] if else

if (${1:condition}) {
  ${2:expression}
}
else {
  ${3:second expression}
}

[j.switch] switch

switch (${1:expression}) {
  case ${2:value1}:
    ${3:instructions}
    break;
  case ${4:value2}:
    ${5:instructions}
    break;
  case ${6:valueN}:
    ${7:instructions}
    break;
  default:
    ${8:instructions}
    break;
}