Mutations! What's the problem?

Mutations! What's the problem?
0.0 0

#1

Tell us what’s happening:
Checked for every challenge mentioned but cannot get past through them for what reasons? please help.

Your code so far

function mutation(arr) {
  var str = arr[1].toLowerCase().split('');
  var ar = [];
  for (var i = 0; i < str.length; i++) {
    ar.push((arr[0].toLowerCase().indexOf(str[i])));
  }
  var art = ar.indexOf(0);
  ar.splice(art, 1);
  var final = ar.reduce(function(a, b) {
    return a * b;
  }, 1);
  return final > 0;
}

mutation(["floor", "for"]);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36.

Link to the challenge:


#2

okay! it seems like there was some sort of problem which got solved after I reloaded the page. I got past the challenges.


#3

Your code has been blurred out to avoid spoiling a full working solution for other campers who may not yet want to see a complete solution. In the future, if you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

Thank you.


#4

Totally makes sense and yes will do that! Thanks.