These are chat archives for FreeCodeCamp/Help

25th
Jan 2018
Kevin Galang
@kgalang
Jan 25 2018 00:00
To those familiar with react, could you please help me figure out if I am doing anything wrong in this react challenge on the beta site?
Here is the link to the challenge: https://beta.freecodecamp.org/en/challenges/react/use-arraymap-to-dynamically-render-elements
Here is my current code:
const textAreaStyles = {
  width: 235,
  margin: 5
};

class MyToDoList extends React.Component {
  constructor(props) {
    super(props);
    // change code below this line
    this.state = {
      userInput: '',
      toDoList: []
    };
    // change code above this line
    this.handleSubmit = this.handleSubmit.bind(this);
    this.handleChange = this.handleChange.bind(this);
  }
  handleSubmit() {
    const itemsArray = this.state.userInput.split(',');
    this.setState({
      toDoList: itemsArray
    });
  }
  handleChange(e) {
    this.setState({
      userInput: e.target.value
    });
  }
  render() {
    const items = this.state.toDoList.map((x) => {
      return <li> {x} </li>;
    });
    return (
      <div>
        <textarea
          onChange={this.handleChange}
          value={this.state.userInput}
          style={textAreaStyles}
          placeholder="Separate Items With Commas" /><br />
        <button onClick={this.handleSubmit}>Create List</button>
        <h1>My "To Do" List:</h1>
        <ul>
          {items}
        </ul>
      </div>
    );
  }
};

The test that I am failing says:

"When the Create List button is clicked, the MyToDoList component should dynamically return an unordered list that contains a list item element for every item of a comma-separated list entered into the textarea element. };"

Kyle Holm
@thekholm80
Jan 25 2018 00:06
@kgalang remove the spaces around {x} in your map return
Kevin Galang
@kgalang
Jan 25 2018 00:07
@thekholm80 dang it. Loll thanks man. It's all good now
CamperBot
@camperbot
Jan 25 2018 00:07
kgalang sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1671 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Jan 25 2018 00:07
:+1:
Jacob Fines
@jfines
Jan 25 2018 05:37
Does any have experience with dns stuff and setting up a fqdn? I'm trying ot set up a linode server to host a website but the configuration is a little confusing.
Darren
@DarrenfJ
Jan 25 2018 16:25
morning fCC
Stephen James
@sjames1958gm
Jan 25 2018 16:26
@DarrenfJ :wave:
Darren
@DarrenfJ
Jan 25 2018 16:28
@sjames1958gm hey buddy :D
as always pop in here and lurk and see you helping out like a rawk stah! :D
Sweet Coding :)
@SweetCodingInc
Jan 25 2018 16:32
@DarrenfJ Ser Darren :wave:
Kyle Holm
@thekholm80
Jan 25 2018 16:32
@DarrenfJ :wave:
Darren
@DarrenfJ
Jan 25 2018 16:34
hey goofballs :wave:
Kaz Baig
@kbaig
Jan 25 2018 16:51
:wave:
Almost done with this silly reporting system project wooooo
Mohamed Abi
@mohamedabi
Jan 25 2018 17:21
hello guys im stock in this challenge (Using Objects for Lookups)
can u help me with
Stephen James
@sjames1958gm
Jan 25 2018 17:22
@mohamedabi Show your code.
@mohamedabi Or if you have a specific question, ask away!
Mohamed Abi
@mohamedabi
Jan 25 2018 17:24
@sjames1958gm this is me question /phoneticLookup("") should equal undefined ?
i dont know how shuld i wraiting this code with lookup var or what
Stephen James
@sjames1958gm
Jan 25 2018 17:34
@mohamedabi If you access an object with a property that doesn't exist the value is undefined.
And "" shouldn't exist on your lookup object, or any object that I know of.
Spacetime
@justinemar
Jan 25 2018 18:00
does anyone know where i can find some 'meme emojis' that can be use on projects without facing any legal issues
^ the license of that isn't clear..
Kaz Baig
@kbaig
Jan 25 2018 18:03
@justinemar this one is under MIT https://github.com/iamericanartist/SlackMojis
not as good tho lol
Spacetime
@justinemar
Jan 25 2018 18:04
just waht i needed thanks a lot @kbaig
CamperBot
@camperbot
Jan 25 2018 18:04
justinemar sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 555 | @kbaig |http://www.freecodecamp.org/kbaig
Kaz Baig
@kbaig
Jan 25 2018 20:36
@MarcBradbury
const str = 'hello';
const { length: len } = str;
console.log(len);
That's how you assign a constant len the length of str
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:38
thanks Kaz
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:48
so @kbaig sorry to bug you again, you are 100% right it passed but my question to you is why?
const {length :len} = str;
is the "length" there equivilant to say .length? or am i just really that dense? xD
slri
@slri
Jan 25 2018 20:50
it is
cuz .length is a variable of the str object
Kaz Baig
@kbaig
Jan 25 2018 20:51
@MarcBradbury you should read it as const { propertyToLookFor: nameOfConstant } = elementToExtractFrom
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:51
oooooooooooh okay thank you two so much i think i got it now =D you two are life savers
Kaz Baig
@kbaig
Jan 25 2018 20:51
also, usually it's done this way
const { length } = str
slri
@slri
Jan 25 2018 20:52
the thing is specifically asking for it to be renamed tho
Kaz Baig
@kbaig
Jan 25 2018 20:52
because not explicitly defining key/value pairs in an object means both on either side
slri
@slri
Jan 25 2018 20:52
prolly to teach constant naming
Kaz Baig
@kbaig
Jan 25 2018 20:52
{ length } is shorthand for { length: length }
@RuinIsProbablyTaken :wave:
slri
@slri
Jan 25 2018 20:52
ya, but he needs the constant named len
so ykno
that's why they made him do it
Kaz Baig
@kbaig
Jan 25 2018 20:53
I was just providing extra info
slri
@slri
Jan 25 2018 20:53
o
idk i think it's obvious
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:53
No worries i appreciate it. thank you to both of you =]!
Kaz Baig
@kbaig
Jan 25 2018 20:53
I don't know what they cover in ES6 so I just wanted to provide a best practice :)
slri
@slri
Jan 25 2018 20:53
give us cookies fam
Kaz Baig
@kbaig
Jan 25 2018 20:53
eks dee
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:54
how do i give cookies? this is the first time ive used this chat
Kaz Baig
@kbaig
Jan 25 2018 20:54
@MarcBradbury the person and say any form of thank you. Like this!
CamperBot
@camperbot
Jan 25 2018 20:54
kbaig sends brownie points to @marcbradbury :sparkles: :thumbsup: :sparkles:
:cookie: 253 | @marcbradbury |http://www.freecodecamp.org/marcbradbury
Kaz Baig
@kbaig
Jan 25 2018 20:55
@thePerson
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:55
@kbaig
Kaz Baig
@kbaig
Jan 25 2018 20:55
No it's
slri
@slri
Jan 25 2018 20:55
in the same message
Kaz Baig
@kbaig
Jan 25 2018 20:55
thank you in the same message
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:55
okay !
Thank you @kbaig
CamperBot
@camperbot
Jan 25 2018 20:55
marcbradbury sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 556 | @kbaig |http://www.freecodecamp.org/kbaig
Kaz Baig
@kbaig
Jan 25 2018 20:55
THERE WE GO BOII
slri
@slri
Jan 25 2018 20:55
o wow
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:55
thank you @RuinIsProbablyTaken
CamperBot
@camperbot
Jan 25 2018 20:55
marcbradbury sends brownie points to @ruinisprobablytaken :sparkles: :thumbsup: :sparkles:
:cookie: 759 | @ruinisprobablytaken |http://www.freecodecamp.org/ruinisprobablytaken
slri
@slri
Jan 25 2018 20:56
aww yeaaaa
Kaz Baig
@kbaig
Jan 25 2018 20:56
My CEO just said amazingasaurus... send help pls
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:56
enjoy hahaha thanks for all the help! gonna get back to the grind! lol
Kaz Baig
@kbaig
Jan 25 2018 20:56
This is the Help room isn't it
Marc Bradbury
@MarcBradbury
Jan 25 2018 20:56
yes it is
slri
@slri
Jan 25 2018 20:56
ya but we don't help with old men making jokes
Kaz Baig
@kbaig
Jan 25 2018 20:57
We need a policy change
slri
@slri
Jan 25 2018 20:57
you gotta go to the admin room for those sorts of services
Marc Bradbury
@MarcBradbury
Jan 25 2018 21:25

OKAY last one promise!
thought I had it and I was even feeling confidant with this one, but allas apparently not..
https://beta.freecodecamp.org/en/challenges/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects

this is my code. It passes the first test but apparently isnt using "nested destructuring" buuuuuut i thought thats exactly what i did?

const {tomorrow : {max : maxOfTomorrow}} = LOCAL_FORECAST;

Am i really still missing something here? or did i break it...?

Kyle Holm
@thekholm80
Jan 25 2018 21:34
@MarcBradbury you should use the argument forecast not the gobal variable LOCAL_FORECAST
then it should work
Marc Bradbury
@MarcBradbury
Jan 25 2018 21:35
@thekholm80 Thanks!
CamperBot
@camperbot
Jan 25 2018 21:35
marcbradbury sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1672 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Marc Bradbury
@MarcBradbury
Jan 25 2018 21:36
i literally tried that two seconds ago ... lol bet i did something real simple like a misspelling something hahaha but you are right it works
thank you
Kyle Holm
@thekholm80
Jan 25 2018 21:37
i had to read the instructions 3 times and use every bad word I could think of to figure it out
Marc Bradbury
@MarcBradbury
Jan 25 2018 21:38
hahaha was close tho!!! hahah the whole ES6 is like that... the instructions are so unclear lol so half the puzzle is figuring out wtf they mean hahaha
Kyle Holm
@thekholm80
Jan 25 2018 21:40
yeah, i've thought that a lot. then I think "I should make a PR and reword these challenges" but when it comes to actually coming up with better instructions I fail miserably
Marc Bradbury
@MarcBradbury
Jan 25 2018 21:42
I am right there with ya. hopefully it gets worked out once they launch the beta...
Bjorn van de Peut
@bjorno43
Jan 25 2018 22:09
@RuinIsProbablyTaken Hey, could I have a private chat with you for a min? :)
slri
@slri
Jan 25 2018 22:22
aight gimme a sec
Kyle Holm
@thekholm80
Jan 25 2018 22:28
it's a trap
Darren
@DarrenfJ
Jan 25 2018 22:35
oh lawd sooo tempted to do an Admiral Ackbar gif...
DarrenfJ @DarrenfJ must restrain...self... uuuuuuuuuuuuuuuggghhhhfffffffghhhh
Darren
@DarrenfJ
Jan 25 2018 22:37
My CEO just said amazingasaurus... send help pls
ha!
Kyle Holm
@thekholm80
Jan 25 2018 22:37
i hope those squid guys are still around somewhere
oops Mon Calamari, not squid guys
Darren
@DarrenfJ
Jan 25 2018 22:48
yes, please let's not be speciesist
what a great name though
Kyle Holm
@thekholm80
Jan 25 2018 22:49
lol yeah
Darren
@DarrenfJ
Jan 25 2018 22:54
now i've gone down the rabbit hole of wookiepedia about the war on Mon Cala
Kyle Holm
@thekholm80
Jan 25 2018 22:54
lol
Darren
@DarrenfJ
Jan 25 2018 22:56
seriously.. when i get into a thang i can be gone for hours...
star wars.. skyrim... and lately star trek now too
Kyle Holm
@thekholm80
Jan 25 2018 22:57
I'm the same way. I found a guy on youtube that does crap with chemistry and for some reason I can't stop watching his videos
tomorrow something new and shiny will come along and I'll be binging on that instead
Darren
@DarrenfJ
Jan 25 2018 22:59
this sounds like a set of links i might want to check out
hypothetically of course
Kyle Holm
@thekholm80
Jan 25 2018 22:59
it's Cody's Lab
a fellow Utahn
Darren
@DarrenfJ
Jan 25 2018 22:59
thanks @thekholm80
CamperBot
@camperbot
Jan 25 2018 22:59
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1673 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Bjorn van de Peut
@bjorno43
Jan 25 2018 23:00
I have that with Wikipedia. Sometimes I'm looking something up and then I find more interesting stuff in that article and before I know I've spend hours reading about all kinds of stuff, lol
Darren
@DarrenfJ
Jan 25 2018 23:03
@thekholm80 just checked out the new and old promo vids.. looks like fun stuff
@bjorno43 sameSame here :D
Kyle Holm
@thekholm80
Jan 25 2018 23:03
I don't know why i like it so much, but he's got some really interesting content
Darren
@DarrenfJ
Jan 25 2018 23:03
@thekholm80 have you seen the youtubes by the woman who make ridiculous robot junk that always fails.. it's hilarious
Kyle Holm
@thekholm80
Jan 25 2018 23:04
oh yeah, she's part of the Tested team now. Simone Gertz or something like that?
Darren
@DarrenfJ
Jan 25 2018 23:08
yah.. they're all fun
on of my fav's wake up machine
Kyle Holm
@thekholm80
Jan 25 2018 23:09
rofl that's awesome
I hadn't seen that one before
Darren
@DarrenfJ
Jan 25 2018 23:10
also: we are now at 2 minutes to midnight.. in honour of thee end
yah her robots are so amazing and totally effed...
Darren
@DarrenfJ
Jan 25 2018 23:17
ok later roomies.. hafta finish some stuff up and then off to the world of binge watching crappy tv
Bjorn van de Peut
@bjorno43
Jan 25 2018 23:18
@DarrenfJ Cya later Darren. Have fun! :wave:
Kaz Baig
@kbaig
Jan 25 2018 23:23
@thekholm80 do you know how to pronounce Simone Giertz?
Kyle Holm
@thekholm80
Jan 25 2018 23:23
i have a vague idea
I bet bob knows
Kaz Baig
@kbaig
Jan 25 2018 23:23
I was almost as surprised as when I learned how to pronounce Turkey's president Erdogan
Simone Yetch
Kyle Holm
@thekholm80
Jan 25 2018 23:24
oh wow, nope I was way off
Kaz Baig
@kbaig
Jan 25 2018 23:24
How about Erdogan lmao
it's Erdowan
Kyle Holm
@thekholm80
Jan 25 2018 23:24
i know that one lol I watch a lot of news
here's one for you: saoirse ronan
actress
Kaz Baig
@kbaig
Jan 25 2018 23:24
Well you did better the commander in chief
Ima go with sairse
or soars
Kyle Holm
@thekholm80
Jan 25 2018 23:25
sure-sha
Kaz Baig
@kbaig
Jan 25 2018 23:25
soar-sha
Those names need phonetic spellings.
Kyle Holm
@thekholm80
Jan 25 2018 23:26
here's a fun song on how to pronounce it lol
starts at about 1:30
slri
@slri
Jan 25 2018 23:29
protip: t=1m30s
Kyle Holm
@thekholm80
Jan 25 2018 23:30
that takes effort
slri
@slri
Jan 25 2018 23:30
or you can just write it all in seconds
Kaz Baig
@kbaig
Jan 25 2018 23:54
I just discovered that Wix uses React. For example: http://www.mayhemracemanagement.com/cactusclassic
At first I was like OMG no way this site is built in React
Kyle Holm
@thekholm80
Jan 25 2018 23:56
i always get a little excited when I see the react symbol light up when I visit a new site
image.png
Kaz Baig
@kbaig
Jan 25 2018 23:56
saaaaaaame
I'm always like oh hey girlfrieeeeend
Kyle Holm
@thekholm80
Jan 25 2018 23:57
lol