This problem can be easily resolved in the Google Chrome browser.
You must press F12 to start Chrome Developer Tools.
Then add the javascript to the Console.
The filter method is part of the ECMAScript 5.
The resulting array contains the values that are not ‘Blue’.
1 2 3 4 5 | var colors = new Array('Red', 'Orange', 'Yellow', 'Green', 'Cyan', 'Blue', 'Indigo', 'Violet'); var return_array = colors.filter(function(item) { return item != 'Blue'; }); console.log(return_array); |