Check out a free preview of the full A Practical Guide to Algorithms with JavaScript course

The "Linear Search Exercise" Lesson is part of the full, A Practical Guide to Algorithms with JavaScript course featured in this preview video. Here's what you'd learn in this lesson:

In this exercise, students implement linear search.

Preview
Close

Transcript from the "Linear Search Exercise" Lesson

[00:00:00]
>> Bianca Gandolfo: So, the next bit would be either to implement linear search. So, for this exercise, we are going to implement linear search. Linear search takes two arguments. The first one is a list, it doesn't necessarily have to be sorting, and the item that you're looking for.
>> Bianca Gandolfo: Yeah, and so the task here is to implement the body of this function such that it looks through the array to find the value 90, and it returns the array.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now