by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called falsey bouncer. [ Check the map? ]
    Tyler Cheek
    @Hoid
    bonfire seek and destroy
    CamperBot
    @camperbot

    :fire:Bonfire: Seek and Destroy :link:

    function destroyer(arr) {
      // Remove all the values
      return arr;
    }
    
    destroyer([1, 2, 3, 1, 2, 3], 2, 3);

    You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.

    more info:  bf details | bf links | hint

    Tyler Cheek
    @Hoid
    Can someone look at this code for Seek and Destroy?
    function destroyer(arr) {
      // Remove all the values
      array = [];
      inputArray = arr[0];
      valuesToBeRemoved = [];
      for(var i=1; i<arr.length; i++) {
        valuesToBeRemoved.push(arr[i]);
      }
      array = inputArray.filter(function(val) {
        if(valuesToBeRemoved.indexOf(val) !== -1) {
          return true;
        } else {
          return false;
        }
      });
      return array;
    }
    It gives me the error that inputArray.filter is not a function
    Nate
    @bassmannate
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Makist95
    @Makist95
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Makist95
    @Makist95
    falsy bouncer
    bonfire name Falsy Bouncer
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called name falsy bouncer. [ Check the map? ]
    Julie
    @robojukie
    bonfire falsy bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    Julie
    @robojukie
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Julie
    @robojukie
    bonfire bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    Julie
    @robojukie
    bf details
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Julie
    @robojukie
    bonfire bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    Julie
    @robojukie
    bf details
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called details. [ Check the map? ]
    Julie
    @robojukie
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Julie
    @robojukie
    bonfire falsey bouncer
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called falsey bouncer. [ Check the map? ]
    Rick Markins
    @rkmarks
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Rick Markins
    @rkmarks
    bonfire falsy bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    Rick Markins
    @rkmarks
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    Rick Markins
    @rkmarks
    falsy bouncer hint
    bonfire falsy bouncer
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called falsy bouncer hint. [ Check the map? ]
    Rick Markins
    @rkmarks
    bonfire falsy bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    Rick Markins
    @rkmarks
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    jquerybug
    @jquerybug
    hint
    CamperBot
    @camperbot
    Set a bonfire to talk about with bonfire name
    jquerybug
    @jquerybug
    bonfire falsey-bouncer
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called falsey-bouncer. [ Check the map? ]
    jquerybug
    @jquerybug
    bonfire Falsy Bouncer
    CamperBot
    @camperbot

    :fire:Bonfire: Falsy Bouncer :link:

    function bouncer(arr) {
      // Don't show a false ID to this bouncer.
      return arr;
    }
    
    bouncer([7, 'ate', '', false, 9]);

    Remove all falsy values from an array.

    more info:  bf details | bf links | hint

    jquerybug
    @jquerybug
    bf details
    CamperBot
    @camperbot
    Sorry, can't find a bonfire called details. [ Check the map? ]
    Andrew Dowling
    @LBOD2000

    I have been trying to understand why the value null gets thru the function. The rest of it works the way I think it should.
    function bouncer(arr) {
    var falsy = [false, null, 0, "", undefined, NaN,];
    for (i=0; i<falsy.length; i++){
    var index = arr.indexOf(falsy[i]);
    if (index == -1){
    console.log(index);
    }
    else arr.splice(index, 1);
    }
    return arr;
    }

    bouncer([1, null, NaN, 2, undefined]);