Ad
  • Custom User Avatar

    Hi! I can't seem to see why this isn't working. Any clues?

    var FilterString = function(value) {
      var newarr = value.split("");
      for(var i = 0; i < newarr.length; i++){
        var arr = [];
        if (Number(newarr[i]) !== "NaN") {
          arr.push(newarr[i]);    
        }
      }
      return Number(arr);
    }
    

    Thanks in advance!

  • Custom User Avatar

    Someone with a legitimate argument at least. You're absolutely right, and I retract my initial discourse. I guess I was going off of the majority of 8 kyu kata not being so simple. Thanks for clearing that up.

  • Custom User Avatar

    lol. what is this the military? i wasnt disrespecting him, merely giving constructive criticism. you shouldn't take yourself and your 'rank' so seriously, because ultimately, it doesn't matter.

  • Custom User Avatar

    I don't think this was really challenging enough to be on here, this is more something you'd learn on Codecademy. I thought this site was for people who had the working basics of programming down at least.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Is 3^4 not 81? I feel like I'm missing something here...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thank you! I'll continue to tinker wth it. I tried using this code:

    function last(list){
    return list[list.length - 1] || last[last.length - 1] || arguments[arguments.length - 1];
    };

    It seemed to fix my arguments issue, however I don't think the || operator is meant to be used in that fashion, as it still did not pass all the tests when I tried to submit it (only 8 out of 10), so I'll just keep tinkering.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Am I still doing something wrong then? Tried new code and still getting 'undefined' for the arguments object. Here is code:

    function last(list){
    return (typeof list == "array" || "string") ? list[list.length - 1] : arguments[arguments.length - 1];
    };

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution