Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 20:09
    @krisb1220 banned @Gastony
  • May 14 22:38
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:37
    @bjorno43 banned @real-action
  • Feb 01 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • May 10 2019 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Apr 01 2019 18:11
    thecodingaviator labeled #31179
  • Apr 01 2019 18:11
    thecodingaviator labeled #31179
  • Apr 01 2019 18:09
    thecodingaviator commented #31179
  • Apr 01 2019 18:09
    thecodingaviator labeled #31182
  • Apr 01 2019 18:09
    thecodingaviator labeled #31182
  • Apr 01 2019 18:07
    thecodingaviator commented #31182
  • Apr 01 2019 18:07
    thecodingaviator labeled #31190
  • Apr 01 2019 18:07
    thecodingaviator labeled #31190
  • Apr 01 2019 18:07
    thecodingaviator commented #31190
  • Apr 01 2019 18:05
    thecodingaviator commented #31157
  • Apr 01 2019 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

Stephen James
@sjames1958gm
split returns an array which doesnt have split
Jason Luboff
@JLuboff
@jdc101214 Yes, there is literally a section called "Examples"
David Amanze
@GodKingShogun
@JLuboff ok. ill be back soon. i have to go smash 10 eggs on my head for my foolishness
lol
Jason Luboff
@JLuboff
I'll be long gone into the weekend..
:laughing:
Jacob
@jdc101214
@JLuboff I just word searched the page and couldn't find the word "variable" in the whole page...
Jason Luboff
@JLuboff
@jdc101214 Look at the examples. They use variables in the examples
Jacob
@jdc101214
ok I see it now. Thanks @JLuboff
CamperBot
@camperbot
jdc101214 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 495 | @jluboff |http://www.freecodecamp.com/jluboff
Jason Luboff
@JLuboff
Have a good weekend all
David Amanze
@GodKingShogun
@JLuboff i am on the title case problem and it wants me to capitalize the first letter in each word in a string. Basically i will have to use the .split,.map, and .join method to complete this challenge right
Jacob
@jdc101214
Why is this code not working?
function destroyer(arr) {
  // Remove all the values
  var arr1 = "";
  for(var i = 0; i < arguments.length; i++){
    arr1 = arguments[0[i]].replace(arguments[i], "");
  }

}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
David Amanze
@GodKingShogun
@JLuboff have a good weekend after you answer my last question lol
HeebieGeeBee
@HeebieGeeBee
what are arguments?
in this code
Alexander Køpke
@alexanderkopke
arguments are what you pass to a function
HeebieGeeBee
@HeebieGeeBee
i mean in his code
what do his parameters 'arguments' mean
Walid Ashri
@walidashri
@jdc101214 I think replace is a String method
Jacob
@jdc101214
your right....
Why doesnt it work with everything!!!!!!!
Alexander Køpke
@alexanderkopke
@HeebieGeeBee destroyer is the function and it has arr as a parameter... when you call it you can pass arguments like this: destroyer([1, 2, 3, 1, 2, 3], 2, 3); the arr parameter will be [1, 2, 3, 1, 2, 3]
Walid Ashri
@walidashri
@HeebieGeeBee all what is passed between the () when you call the function
HeebieGeeBee
@HeebieGeeBee
so i can just write arguments into code?
instead of arr or whatever the actual argument is called
so in this code would arguments.length do the same things as writing arr.length?
Alexander Køpke
@alexanderkopke
@HeebieGeeBee yes arguments will hold whatever is being passed. It is array like but not an actual array, So if you treat it like a normal array it might cause problems
there are three arguments passed. arr will take the first arguments which is the array
HeebieGeeBee
@HeebieGeeBee
oh ok cool ty @alexanderkopke and @walidashri
CamperBot
@camperbot
heebiegeebee sends brownie points to @alexanderkopke and @walidashri :sparkles: :thumbsup: :sparkles:
:cookie: 890 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
:cookie: 772 | @walidashri |http://www.freecodecamp.com/walidashri
Gilbert
@GilTorch
Alexander Køpke
@alexanderkopke
to access the other arguments you can use arguments
Joshua
@jfc246

how do i assign lots of different objects to return different things? i'm stuck on Stand in Line
i think that is the problem
code:


function nextInLine(arr, item) {
  // Your code here

  return item ;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

link: https://www.freecodecamp.com/challenges/stand-in-line#?solution=%0Afunction%20nextInLine(arr%2C%20item)%20%7B%0A%20%20%2F%2F%20Your%20code%20here%0A%0A%20%20return%20item%20%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%2F%2F%20Test%20Setup%0Avar%20testArr%20%3D%20%5B1%2C2%2C3%2C4%2C5%5D%3B%0A%0A%2F%2F%20Display%20Code%0Aconsole.log(%22Before%3A%20%22%20%2B%20JSON.stringify(testArr))%3B%0Aconsole.log(nextInLine(testArr%2C%206))%3B%20%2F%2F%20Modify%20this%20line%20to%20test%0Aconsole.log(%22After%3A%20%22%20%2B%20JSON.stringify(testArr))%3B%0A

ge022
@ge022
Ya'll, what does a sub array look like?
Alexander Køpke
@alexanderkopke
@jfc246 each function can only return one thing. But it can run code before it returns something which is what is needed here. You have to push item to the arr array. And then remove the first element in that array and return it.
RhinoTek
@RhinoTek
Has anyone done the Stand in line challenge?
Alexander Køpke
@alexanderkopke
@ge022 I guess it is an array within an array?! [1, 2, 3, ["a", "b", "c"]] the last one I would call a sub array
@RhinoTek yes
Joshua
@jfc246
how would i do that? @alexanderkopke
Alexander Køpke
@alexanderkopke
@jfc246 what methods have you learned working with arrays? it is ok if you don't remember just asking
@jfc246 I believe you have learned about the push method and the shift method
So push pushes something to the array. Here is an example: array.push("hello"); <-- this would add "hello" to the array named array.
Joshua
@jfc246
@alexanderkopke like this?
ourArray.push(["happy", "joy"]);
Alexander Køpke
@alexanderkopke
@jfc246 exactly! Here you push ["happy", "joy"] to the ourArray array
@jfc246 in the example you're at arr is the array and item is what need to be pushed to that array
Joshua
@jfc246

@alexanderkopke so would i replace the

our Array

with

nextInLine