Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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)

  • Apr 01 2019 18:04
    thecodingaviator closed #31157
  • Apr 01 2019 18:04
    thecodingaviator closed #33788
  • Apr 01 2019 18:04
    thecodingaviator commented #33788
Walid Ashri
@walidashri
@jdc101214 you still need 2nd arg in replace
Jacob
@jdc101214
@walidashri That wasnt a literal example
David Amanze
@GodKingShogun
i am working on a challenge and i am trying to think of how to apply the code to solve the problem. is it possible to call .split() two times in a row
Walid Ashri
@walidashri
ok sorry but this gonna work :+1:
Jason Luboff
@JLuboff
@GodKingShogun What do you mean by call split twice?
Jacob
@jdc101214
@JLuboff Where does it talk about the variables?
RhinoTek
@RhinoTek
I am stuck on 'Stand In Line' with no idea where to start. Anyone get there yet?
Jason Luboff
@JLuboff
@jdc101214 Did you look through it? There's examples throughout the page..
David Amanze
@GodKingShogun
@JLuboff can i go str.split(" ").split(" ") or is that bonkers
Jacob
@jdc101214
is there?
Stephen James
@sjames1958gm
@GodKingShogun bonkers
Jason Luboff
@JLuboff
@GodKingShogun The second split wouldn't do anything
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?