Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active October 21, 2021 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/7ffb41341a512896050cc7e417e2dde7 to your computer and use it in GitHub Desktop.
Save McLarenCollege/7ffb41341a512896050cc7e417e2dde7 to your computer and use it in GitHub Desktop.
Length of Vacation spots

Write a function that returns the length of the vacationSpots array using a for loop.

NOTE: Dont use the .length property

function lengthOfVacationSpots(vacationSpots){
// write your code here
}
let vacationSpots = ['Bali', 'Phuket', 'Goa', 'Kochi', 'Sydney', 'Barcelona', 'Las Vegas'];
lengthOfVacationSpots(vacationSpots);//7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment