From 3368fbede95e2835cfd326b1f12b36c6dc6a8c9f Mon Sep 17 00:00:00 2001 From: Snuffleupagus Date: Wed, 9 Jan 2013 11:36:43 -0800 Subject: [PATCH] Add a note regarding strict equalities --- Style-Guide.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Style-Guide.md b/Style-Guide.md index 0de3ae1..45b349c 100644 --- a/Style-Guide.md +++ b/Style-Guide.md @@ -28,6 +28,19 @@ _Note: This wasn't always followed, but any new code should do this._ if (someVar) { ``` +## Equalities +* Use only strict equalities (and inequalities) in control statements, e.g. + +```javascript +if (someVar === conditionA) { + return true; +} else if (someVar !== conditionB) { + return false; +} +``` + +_Note: This wasn't always followed, but any new code should do this._ + ## Classes The standard way of creating classes in pdf.js is the following. Please note that by class we mean an object that is class-like. Also, note the naming of all anonymous functions.