These are chat archives for FreeCodeCamp/Help

6th
May 2019
Riadh
@KWFE
May 06 05:47
hi, how are you guys, i am looking for front end chat room and javascript room for fcc
Kranti Nebhwani
@darkphotonKN
May 06 07:18

Im trying to do this in react but I guess it's just a general javascript question, inside a function I want to pass in a value as as argument that I can only get to by accessing one of it's properties like: person.name. This leaves a syntax error, and I'm not sure why. Example:

(age, person.name) => this.myFunction(age, person.name)

I can't preset a variable as person.name as this property is only available inside a loop (during the map iteration) and the above function is run on a single line because it's called inside the JSX in react's return statement and so cannot be multiline. Any guidance is appreciated.

Pavlo Rudyi
@paulcarroty
May 06 11:18
@darkphotonKN create a variable in scope above your this.myFunction and handle it inside your loop
Christopher McCormack
@cmccormack
May 06 15:39
@darkphotonKN (age, person.name) this is not valid syntax, just use (age, person)
Josebuendia
@Josebuendia
May 06 16:04
If you have 5 folders in a zipped file; which one contains the code usually? Settings, bin, Src or .Classpath or .project?
Christopher McCormack
@cmccormack
May 06 16:09
@Josebuendia usually src has the non-compiled code, but without context that's just a guess for your use case
Josebuendia
@Josebuendia
May 06 16:20
@cmccormack Thanks, that's saved so much time! Though is there any way to change the IDE from IntelliJ to Eclipse? The file was created in Eclipse but properties it says that the file type is IntelliJ.
Christopher McCormack
@cmccormack
May 06 16:21
I don't usually work with files bound to any IDE, not even sure what that means
Josebuendia
@Josebuendia
May 06 16:24
It's working fine now through Eclipse thanks.
Christopher McCormack
@cmccormack
May 06 16:27
@Josebuendia :thumbsup:
Josebuendia
@Josebuendia
May 06 18:16
How do you change a class after the fact?
I forgot to click the public static void main(String[] args) box.