Greater vs Unequal

Edit on GitHub

Compare indexOf greater against unequal

Setup

var a = 'string';

Tests

  • Greater

    if (a.indexOf('str') > -1) {
    return true;
    }
  • Unequal

    if (a.indexOf('str') !== -1) {
    return true;
    }