$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #102

Complete the function

// returns true if the array contains the value
function has(arr: number[], value: number): boolean {
  return arr.____(value);
}
// has([1,2,3], 2) -> true

Answer: includes (also accepted: includes, includes())

includes() returns a boolean indicating membership.
Play Problem Solving ▸