Skip to content

Instantly share code, notes, and snippets.

@celsobessa
Last active February 26, 2024 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celsobessa/e4283e46c1bc3173f2f5322506fda031 to your computer and use it in GitHub Desktop.
Save celsobessa/e4283e46c1bc3173f2f5322506fda031 to your computer and use it in GitHub Desktop.
Conversa ABNT Acessibilidade web OU / Exceto
/** Pseudocódigo
// caso "exceto"/"except", "a não ser"/"unless", SENÃOFOR/IFNOT
IF ( condition NOT true) THEN
criteria must be met
ENDIF
// caso "ou"/"OR"
IF (criteria IS true OR condition IS true) THEN
criteria is met
ENDIF
// caso "ou exclusivo"/"XOR"
IF (criteria IS false AND condition IS true) THEN
criteria is met
ENDIF
**/
// caso "exceto"/"except", "a não ser"/"unless"
if ( isCondition() === false ) {
meetsCriteria();
}
// caso "ou"/"or"
if (meetsCriteria() === true || isCondition() === true ) {
meetsCriteria();
}
// caso "ou exclusivo"/"or"
if (meetsCriteria() === false && isCondition() === true ) {
meetsCriteria();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment