What does the following JavaScript code do? contains(a, obj) { for (var i = 0; i < a.length; i++) { if (a[i] === obj) { return true; } } return false; }
Correct Answer: It checks if an array contains 'obj'.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More JavaScript MCQ Questions