The use of wrapper objects for primitive types is gratuitous, confusing and dangerous. Simple literals should be used instead.

Noncompliant Code Example

var x = new Boolean(false);
if (x) {
  alert('hi');  // Shows 'hi'.
}

Compliant Solution

var x = false;
if (x) {
  alert('hi');
}