This function is only returning true. I have added a console.log in the if block and it is called but the function doesn't return false.
function isUniform(List)
{
var ele = List[0];
List.forEach(function(item)
{
console.log(ele);
if(ele !== item)
{
return false;
}
})
return true;
}