I need to test whether each item in an array is identical to each other. For example:
var list = ["l","r","b"]
Should evaluate as false
, because each item is not identical. On the other hand this:
var list = ["b", "b", "b"]
Should evaluate as true
because they are all identical. What would be the most efficient (in speed/resources) way of achieving this?