Javascript comparison behaving differently in different browsers [closed]

I tested the code in 4 browsers, Chromium v25, Google Chrome v27, FireFox v21 and Opera v12.14 an all gave the result UnFollow Follow. Which browsers are you saying are inconsistent?

Javascript

 var dataList = [{
     "UserId": 1,
     "Name": "John",
     "isFollowed": 1
 }, {
     "UserId": 2,
     "Name": "",
     "isFollowed": 0
 }];

 for (i = 0; i < dataList.length; i++) {
     console.log(((dataList[i].isFollowed == 0) ? "Follow" : "UnFollow"));
 }

On jsfiddle

Leave a Comment