<reponame>OBigVee/alx-higher_level_programming<filename>0x13-javascript_objects_scopes_closures/7-occurrences.js<gh_stars>0#!/usr/bin/node

exports.nbOccurences = function (list, searchElement) {
  let count = 0;
  for (const i of list) {
    if (i === searchElement) {
      count += 1;
    }
  }
  return count;
};
