dropIt Advanced Algorithm Scripting Question


The following solution to this challenge passes all my local tests:

I get an error which seems not related to the code.

" freeCodeCamp.org

fcc2024ea27-dda6-4d4c-8c5d-a9f6c8b03e26's avatar

“Close alertSomething is not quite right. A report has been generated and the freeCodeCamp.org team have been notified”

“// running tests
TypeError: Cannot read property ‘message’ of undefined”

My code:

function dropElements(arr, func) {
  let splicedArrayFromPositionWhereFunctionTrueFirstTime;
  for (let index = 0; index < arr.length; index++) {
    if (func(arr[index])) {
      splicedArrayFromPositionWhereFunctionTrueFirstTime = arr.splice(index);
      return splicedArrayFromPositionWhereFunctionTrueFirstTime;

  return [];

dropElements([1, 2, 3], function (n) {
  return n < 3;

module.exports = dropElements;

this usually happen if you have an old browser and you need to update to the newest version, can you try to update your browser and let us know?


I just updated Chrome to latest version on Ubuntu OS and it fixed the problem. Thanks a lot!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.