These are chat archives for FreeCodeCamp/Help

16th
Jul 2018
Manish Giri
@Manish-Giri
Jul 16 2018 04:35
@coderkarma just wanted to point out, you might want to change this
if ( people === []){
         return 'YES';
        }
even when your people array is empty, comparing it with an empty array won't return true
you should probably use if(people.length === 0) or more concisely, if(!people.length)
Karma Drukpa
@coderkarma
Jul 16 2018 04:38
oh!! I thought if i assign it to empty array, i could return that. Thanks @Manish-Giri
[] === [] return false
Manish Giri
@Manish-Giri
Jul 16 2018 04:41
you could make use of default parameters, in that case -
function canSellTickets(people = []){
    if (!people.length){
         return 'YES';
        }
 // more code
}
Karma Drukpa
@coderkarma
Jul 16 2018 04:41
gotcha brother
Manish Giri
@Manish-Giri
Jul 16 2018 04:41
yes, because [] === [] compares two array references, not their contents
as in, if those two array objects are at the same memory location
Karma Drukpa
@coderkarma
Jul 16 2018 04:43
ok. Thanks
Manish Giri
@Manish-Giri
Jul 16 2018 04:44
:thumbsup:
Claudio Restifo
@Marmiz
Jul 16 2018 04:50

But you can convert them into a boolean and compare those. Then it will be true.

#JavaScript

Tarun Garhwal
@eoo
Jul 16 2018 04:53
im usign an API to get some bank info and display it on screen 2
why is my #goback button not working
@Marmiz any idea?
im just using jquey $.hide() and $.show method on the button
but it doesnt seem to work
Manish Giri
@Manish-Giri
Jul 16 2018 04:59
@Marmiz :wave:
@eoo check your browser console (not codepen console), you have errors
Tarun Garhwal
@eoo
Jul 16 2018 05:00
@Manish-Giri nothing shows up in browser console
:/
Manish Giri
@Manish-Giri
Jul 16 2018 05:04
<button id="#goback" class="btn btn-primary">Go Back</button>
in your HTML
the ID should be just goback
then you can refer to it in jQuery using #goback
Tarun Garhwal
@eoo
Jul 16 2018 05:07
oh fuck
thank you so much
Manish Giri
@Manish-Giri
Jul 16 2018 05:07
koi ni
:thumbsup:
Karma Drukpa
@coderkarma
Jul 16 2018 05:08
haha
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:22
This React challenge :
Items.propTypes = {quantity: PropTypes.number}
is this declaration correct
Tarun Garhwal
@eoo
Jul 16 2018 05:24
which react challange
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:25
Typechecking using propTypes
Tarun Garhwal
@eoo
Jul 16 2018 05:27
link/>
?
Claudio Restifo
@Marmiz
Jul 16 2018 05:29
@anandpotukchi LGTM
@Marmiz do i include import PropTypes from 'prop-types'
Claudio Restifo
@Marmiz
Jul 16 2018 05:35

Should be made under the hood for you. Side note, I don't know which version of React FCC is using for the challenges, but even the note is outdated.

PropTypes is now its own module that doesn't come with React itself anymore

Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:35
yeah did a search
ain't working
tried importing propTypes
Claudio Restifo
@Marmiz
Jul 16 2018 05:37
I doubt it will work. I don't think the REPL is running on node (so no import ;) )
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:39
require is not defined
any idea what this is
Claudio Restifo
@Marmiz
Jul 16 2018 05:40
@anandpotukchi yeah, you are not in a Node env, so no import
I just tried the challenge, try withisRequired as well
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:40
didyou do it?
Claudio Restifo
@Marmiz
Jul 16 2018 05:40
(and remove the import)
just now
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:40
share the code
Claudio Restifo
@Marmiz
Jul 16 2018 05:41
@anandpotukchi just told you, require ir
*it
make quantity a required prop

Items component to require quantity as a prop

not the best wording but still...

Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:44
did't work
Claudio Restifo
@Marmiz
Jul 16 2018 05:44
updated code?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:44
just share the code
it's easier to compare
make quantity a required prop
Claudio Restifo
@Marmiz
Jul 16 2018 05:48

@anandpotukchi nope. Won't do that.
I already know how to require a prop.
I feel you don't :)

By giving you the code I won't help you learn.

HINT: just look at the example. Or look at the official documentation and see how they make sure that a warning is thrown when the prop isn't provided

Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:49
PropType.number.isRequired
true
PropType.number.isRequired
is this correct ? @Marmiz
Claudio Restifo
@Marmiz
Jul 16 2018 05:57
Have you tried it? @anandpotukchi
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:57
yes
Claudio Restifo
@Marmiz
Jul 16 2018 05:57
and?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:57
not working
Claudio Restifo
@Marmiz
Jul 16 2018 05:57
can you link your challenge again?
please
wait
I;m turing again
done
my browser has a problem
Claudio Restifo
@Marmiz
Jul 16 2018 05:59
glad it worked :sparkles:
Anand Potukuchi
@anandpotukchi
Jul 16 2018 05:59
nees to reload atleast twice for each challenge
need to clean temp i guess
cookies
thanks
284389492
@284389492
Jul 16 2018 06:42
hello
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:43
hi
284389492
@284389492
Jul 16 2018 06:45
Why is the child element of .target a button? Is .target not a child of the button?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:45
uh..could you elaborate
there's no context here
284389492
@284389492
Jul 16 2018 06:46
I don't know how to send pictures...
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:47
which callenge is it
copy and paste the linik here
and/or [aste the code
use ``
put code in ``
or 3 ` in begining and end of code, if code is greater than one line
284389492
@284389492
Jul 16 2018 06:50
I do not know how to do that
but
Target a Specific Child of an Element Using jQuery
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:50
send the chjallennge link
284389492
@284389492
Jul 16 2018 06:50
it is this
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:51
not the name
the link
284389492
@284389492
Jul 16 2018 06:52
the link is to many row
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:52
Seems like you didn't understand
do you know what the address bar is
in a browser
284389492
@284389492
Jul 16 2018 06:53
i'm sorry
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:53
the link at the top of the page
freecodecamp.org
284389492
@284389492
Jul 16 2018 06:53
i know
ok
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:53
copy that here
284389492
@284389492
Jul 16 2018 06:53
i',m try
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:54
great]
284389492
@284389492
Jul 16 2018 06:54
It’s not the same as it’s just now, this link
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:54
what\
284389492
@284389492
Jul 16 2018 06:55
is‘t nothing
it’s nothing
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:56
are you ahle to do the chalenge
or are you stuck
284389492
@284389492
Jul 16 2018 06:56
i can
i just don't know
Why is the child element of .target a button? Is .target not a child of the button?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:57
you are mistaken
the chld of taregt sin;t a button
target is the id given to the element
which is btn here
284389492
@284389492
Jul 16 2018 06:59
<button class="btn btn-default target" id="target1">#target1</button>
like this
Anand Potukuchi
@anandpotukchi
Jul 16 2018 06:59

indicates id - which is unique to one element

284389492
@284389492
Jul 16 2018 06:59
target is button class
Anand Potukuchi
@anandpotukchi
Jul 16 2018 07:00
okay got it
target is a class - missed that
284389492
@284389492
Jul 16 2018 07:02
i think $(".target:nth-child(2)") choice is button
button child element
this is err
May Kittens Devour Your Soul
@diomed
Jul 16 2018 08:51
hello
anyone here knowing Excel pls come forward :stuck_out_tongue:
Henry
@GitHub-Henry
Jul 16 2018 09:11
@diomed a bit what do you need
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:12
@diomed Haven't seeneexcel int he guide
Are you planning on writing one
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:13
@anandpotukchi silence, human
@GitHub-Henry so I have column B and in it I have numbers . but they're sometimes random. like bunch of 1 1 2 3 4 then sometimes 1 again
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:13
You cannot silene the darkness
@diomed and
?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:14
and tricky part is, I need to find out how many times do I really have number 1
for example
anyway, I need exact amount of one number per that column
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:14
use the frequncy fn
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:15
actually - every number in that column - in the end
Henry
@GitHub-Henry
Jul 16 2018 09:15
@diomed restated, count the occurrences of the number 1 in column b
is that correct
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:15
yes
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:15
@diomed havr a look at this
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:16
I think so. - IDK really the meaning of that word, but probably
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:16
frequency refers to the number of occurrences of an event
in this case - numbers
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:19
I just wonder what'll happen when I have number repeating
Henry
@GitHub-Henry
Jul 16 2018 09:19
countif() looks like it should do it for you
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:19
like will it count 1 in 11
Henry
@GitHub-Henry
Jul 16 2018 09:19
try it
but countif() looks like what you are looking for
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:20
Anyone use gatsby
?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:25
@GitHub-Henry hmm. when I do =COUNTIF(B1:B1109, "2") it says - there's a problem with formula
Henry
@GitHub-Henry
Jul 16 2018 09:29
remove the quotes
worked fine for me
i was looking for a number so i removed the quotes and it found the correct number of occurrences
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:32
I get same error. IDK :(
Henry
@GitHub-Henry
Jul 16 2018 09:33
try it on a small sample to see if you can get the formula to work on a set of 10 numbers. your set might be to big. if it works on the small set you can try it on larger sets of numbers
the first goal is to get the formula to work
May Kittens Devour Your Soul
@diomed
Jul 16 2018 09:48
yup yup yup, it's working now. thanks @GitHub-Henry
Henry
@GitHub-Henry
Jul 16 2018 09:48
@diomed :+1:
how do i solve it?
I don't understad the objectives
Henry
@GitHub-Henry
Jul 16 2018 09:54
@anandpotukchi it may help if you did this tutorial https://reactjs.org/docs/hello-world.html
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:54
I've come this far
Henry
@GitHub-Henry
Jul 16 2018 09:55
the tutorial explains the concepts you are asking about
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:55
I don;t think i need to do the hello-world
Henry
@GitHub-Henry
Jul 16 2018 09:55
it's more than hello world
it covers basic concepts including state, which is what you are asking about. keep reading and it will cover advanced concepts also
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:57
I just need to undrstand
Henry
@GitHub-Henry
Jul 16 2018 09:57
that's what it's there for
to help folks understand react
Anand Potukuchi
@anandpotukchi
Jul 16 2018 09:57
this.state.name
Anand Potukuchi
@anandpotukchi
Jul 16 2018 10:04
cn anyone help
me undrstand what the challenge isabout?
alpox
@alpox
Jul 16 2018 10:08
@anandpotukchi The challenge is about knowing how to use the component state. They want you to put the name that is stored in the state into a local variable in the render function.
Then they want you to print the value of the variable inside of an <h1> tag
Anand Potukuchi
@anandpotukchi
Jul 16 2018 10:10
this.state = { name: 'freeCodeCamp'
const name = {this.state.name}
<h1> {name} </h1>
alpox
@alpox
Jul 16 2018 10:11
@anandpotukchi The second one is almost correct. You gotta remove the {} because they create an object
Anand Potukuchi
@anandpotukchi
Jul 16 2018 10:11
OH
thanks
alpox
@alpox
Jul 16 2018 10:11
Np
Anand Potukuchi
@anandpotukchi
Jul 16 2018 10:23
@alpox still not working

``` class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
name: 'freeCodeCamp'
}
}
render(this.state.name) {
// change code below this lin

const  name = this.state.name
// change code above this line
return (

  <div>
    { /* change code below this line */ }
        <h1>{name}</h1>  
    { /* change code above this line */ }
  </div>
);

}
}; ```

alpox
@alpox
Jul 16 2018 10:29
@anandpotukchi The render function doesn't take arguments - especially, you cannot refer to existing values in a parameter list. So this.state.name is not allowed in render()
The render method in a react component will always have the definition render() (Without arguments)
Anand Potukuchi
@anandpotukchi
Jul 16 2018 10:30
oh
thanks
May Kittens Devour Your Soul
@diomed
Jul 16 2018 10:38
@alpox you here?
alpox
@alpox
Jul 16 2018 10:38
@diomed jup
May Kittens Devour Your Soul
@diomed
Jul 16 2018 10:39
do you know how would I repeat transform animation on this pen
alpox
@alpox
Jul 16 2018 10:39
@diomed I'm eating, i'll look closer after - but usually you can set animations to repeat
May Kittens Devour Your Soul
@diomed
Jul 16 2018 10:39
but am unsure how to apply it
css doodle? I don't know that :D
Henry
@GitHub-Henry
Jul 16 2018 10:45
here's an example of an animation loop https://codepen.io/anon/pen/QByXqY
alpox
@alpox
Jul 16 2018 11:18
@GitHub-Henry Hmm it seems you make your animation with transition. That ones cannot be repeated.
You should use animation with keyframes
Henry
@GitHub-Henry
Jul 16 2018 11:20
animation-iteration-count: infinite; it does repeat
you may be right about transition
and animation/keyframes
May Kittens Devour Your Soul
@diomed
Jul 16 2018 11:27
looks like that doesnt help me on that pen
or IDK how to put it right
Tarun Garhwal
@eoo
Jul 16 2018 11:31
id be fine with kittens devouring my soul tho
May Kittens Devour Your Soul
@diomed
Jul 16 2018 11:35
coz they so lovely, right? :cat:
Smootimus
@Smootimus
Jul 16 2018 13:11
Starting to work on fcc curriculum again :D
Got the syllabus for my html and js class
it's actually html css and js
They use w3 for a reference >.>
But I figured hey, gonna be doing this again might as well take working through the new content seriously :)
Kyle Holm
@thekholm80
Jul 16 2018 13:13
w3 makes me sad
i mean, the 90s were fun and all, but there have been some advancements since then
Ene Catalin
@EneCatalin
Jul 16 2018 13:16
still ok for code snippets right ?
I mean "code" snippets
Kyle Holm
@thekholm80
Jul 16 2018 13:17
might be. mdn has html and css, so i just go there
i haven't looked at w3 in a long while
Smootimus
@Smootimus
Jul 16 2018 13:19
I use it as a stupid quick reference
With examples
Ya know
When I want a stupid quick example of the code, and not learning material to read details, W3
cuteqing
@cuteqing
Jul 16 2018 13:19
image.png
Smootimus
@Smootimus
Jul 16 2018 13:19
Ay that's me :D
So handsome
cuteqing
@cuteqing
Jul 16 2018 13:20
hahaha
Smootimus
@Smootimus
Jul 16 2018 13:20
But I use MDN to learn detail information because they are good at explaining
Less by example, more theory and understanding
Kyle Holm
@thekholm80
Jul 16 2018 13:20
makes sense
Smootimus
@Smootimus
Jul 16 2018 13:23
W3 is more like "Here's what the code looks like" where mdn is "here's what the code does"
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:28
I secretly keep all pic of Smootimus in one folder.
what?!?
Kyle Holm
@thekholm80
Jul 16 2018 13:28
just one folder? amature
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:28
. . .
why? do u have his instagram, mbY?
coz he wont share it with me. ah, man
Kyle Holm
@thekholm80
Jul 16 2018 13:29
i have backups of my backups, in case something happens
can't lose the smoo
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:29
good lord, what a pro, in any area
Azamat
@azamatmj
Jul 16 2018 13:30

I’m straggling to learning Javascript but while building a project(practice) most of the times i forget the syntaxes and words which i have already know.

Is it bad to look back?

Ene Catalin
@EneCatalin
Jul 16 2018 13:30
no
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:30
@azamatmj even the greatest look back
Ene Catalin
@EneCatalin
Jul 16 2018 13:30
google = love
Kyle Holm
@thekholm80
Jul 16 2018 13:30
it's essential
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:31
you shold never look back in love or when crossing the road, but otherwise it's good
Kyle Holm
@thekholm80
Jul 16 2018 13:31
don't look back in anger
at least, that what oasis says
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:32
Life is full of misery, loneliness, and suffering - and it's all over much too soon.
Ene Catalin
@EneCatalin
Jul 16 2018 13:32
what a happy little quote
really puts a smile on your face
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:32
see, ostrich , I think u should use that one, on you know who
Ene Catalin
@EneCatalin
Jul 16 2018 13:33
can see this making ostrich seem like a well adjusted human being
btw I found this
NSFW
Kyle Holm
@thekholm80
Jul 16 2018 13:34
oh geez
i need some r/eyebleach
Ene Catalin
@EneCatalin
Jul 16 2018 13:34
deleted that
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:35
what ?what? what he posted?
ah man!
Kyle Holm
@thekholm80
Jul 16 2018 13:36
lol
Ene Catalin
@EneCatalin
Jul 16 2018 13:36
just a bull friendly sub
Smootimus
@Smootimus
Jul 16 2018 13:37
Bahaha oh you guys, flattering me
Bet ya'll can do a flip book style thing and watch my hair grow LOL
Kyle Holm
@thekholm80
Jul 16 2018 13:38
sometimes i run pics of me backwards to do that
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:39
sometimes I have sinful thoughts about Smoot's hair
Kyle Holm
@thekholm80
Jul 16 2018 13:40
which sin? gluttony?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 13:41
@thekholm80 what is this sorcery @Smootimus
@thekholm80 envy, of course
._.
Smootimus
@Smootimus
Jul 16 2018 13:53
YO!!
How he do that?!
Not to mention, when he let it fall apart how they fell upright and perfect.
LOL! RIGHT?! I have to know which sin
Envy :blush:
Smootimus
@Smootimus
Jul 16 2018 13:58
What was that princess with the long blonde hair that brushed it every single day for hours on end and took awesome care of it, and threw it out a window for a prince to climb
That's me :blush: lol
Anand Potukuchi
@anandpotukchi
Jul 16 2018 14:20
no idea bruh
Kaz Baig
@kbaig
Jul 16 2018 14:20
@Smootimus rapunzel
you know react @Smootimus ?
Kaz Baig
@kbaig
Jul 16 2018 14:22
@anandpotukchi you need three backticks on the line before and after your code
backticks
code
backticks
Anand Potukuchi
@anandpotukchi
Jul 16 2018 14:23
@kbaig typo
class MyComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      visibility: false
    };
    // change code below this line
        this.toggleVisibility = this.toggleVisibility.bind(this)
    // change code above this line
  }
  // change code below this line
  toggleVisibility(visibility) {
    if(visibility == true) {
        this.setState ({
          visibility: false
        });
    } else {
      this.setState ({
        visibility: true
      });
    }
  }
  // change code above this line
  render() {
    if (this.state.visibility) {
      return (
        <div>
           <button onClick={this.toggleVisibility}>Click Me</button>
          <h1>Now you see me!</h1>
        </div>
      );
    } else {
      return (
        <div>
          <button onClick={this.toggleVisibility}>Click Me</button>
        </div>
      );
    }
  }
};
I'm trying to toggle in b/w rtue nad false
what's wrong with this?
Smootimus
@Smootimus
Jul 16 2018 14:24
@kbaig Yes! Awesome haha
Kaz Baig
@kbaig
Jul 16 2018 14:25
@anandpotukchi toggleVisibility(visibility) is the problem
onclick doesn't pass a boolean to the event handler
Smootimus
@Smootimus
Jul 16 2018 14:26
React is something I have yet to really break into and take advantage of, I rely on my friends a lot when it comes to React =\
Kaz Baig
@kbaig
Jul 16 2018 14:26
you need to look at the visibility state every time it's clicked
toggleVisibility() {
  this.setState({ visibility: !this.state.visibility });
}
@anandpotukchi
Anand Potukuchi
@anandpotukchi
Jul 16 2018 14:27
damn
I'm real dumb
thanks @kbaig
Kaz Baig
@kbaig
Jul 16 2018 14:28
@anandpotukchi The onclick event pass a MouseEvent object to the function
No problem
Smootimus
@Smootimus
Jul 16 2018 14:29
Nah, not dumb. It can be tough stuff
Anand Potukuchi
@anandpotukchi
Jul 16 2018 14:30
THREE YEARS a programmer
that's dumb
when you've been in this for that long
Smootimus
@Smootimus
Jul 16 2018 14:32
Meh, I wouldn't look at it like that
Ene Catalin
@EneCatalin
Jul 16 2018 14:41
I would but I love feeling bad about myself. Makes me feel really good and tingly. Seriously though, every skill takes practice blah blah programming is miserably hard to learn
May Kittens Devour Your Soul
@diomed
Jul 16 2018 14:56
@EneCatalin you a big bird now, solve me css problem
Anand Potukuchi
@anandpotukchi
Jul 16 2018 14:57
@diomed share it
May Kittens Devour Your Soul
@diomed
Jul 16 2018 14:58
@anandpotukchi look @ this pen
I'd basically like for animation to repeat a few times
Ene Catalin
@EneCatalin
Jul 16 2018 14:59
you did that ?
holy fucking hell
May Kittens Devour Your Soul
@diomed
Jul 16 2018 14:59
damnit, I didnt do that
Ene Catalin
@EneCatalin
Jul 16 2018 15:00
cat do you know what ostrich hates more than God and C++ ?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:00
I wish I did that
Anand Potukuchi
@anandpotukchi
Jul 16 2018 15:00
@EneCatalin cats?
Ene Catalin
@EneCatalin
Jul 16 2018 15:00
CSS
Anand Potukuchi
@anandpotukchi
Jul 16 2018 15:00
css is beautiful
Lazar Madžić
@LazarMadzic
Jul 16 2018 15:00
Use the conditional operator in the checkEqual function to check if two numbers are equal or not. The function should return either true or false.
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:00
data is beautiful
Anand Potukuchi
@anandpotukchi
Jul 16 2018 15:00
why would anyone hate it'
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:00
:)
Lazar Madžić
@LazarMadzic
Jul 16 2018 15:01

function checkEqual(a, b) {
return a = b ? "true" : "false";
}

checkEqual(1, 2); //can you tell me what is wrong here?

Ene Catalin
@EneCatalin
Jul 16 2018 15:01
obviously due to a poor understanding of the more advanced stuff
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:01
@EneCatalin can tell. he's a JS bird
Ene Catalin
@EneCatalin
Jul 16 2018 15:02
I am ?
the " " ?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:02
now that u finished your studies u must be
Ene Catalin
@EneCatalin
Jul 16 2018 15:02
do you declare booles are strings in js ?
I finished them ?
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:02
good point. @LazarMadzic remove the ""
Ene Catalin
@EneCatalin
Jul 16 2018 15:02
pretty sure it's "true":"false"
like 99% it sees them as strings
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:03
well didnt u finish them? are u calling me a liar now ?
Ene Catalin
@EneCatalin
Jul 16 2018 15:04
finished college
still crap at programming
Ostrich is into AI now, ostrich is gonna fail that so hard
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:05
ostrich is into making lil boys, I see
:smiling_imp:
Ene Catalin
@EneCatalin
Jul 16 2018 15:05
what ?
Lazar Madžić
@LazarMadzic
Jul 16 2018 15:05
@EneCatalin thanks, it solved some issues but it still won't return true
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:05
@anandpotukchi I hope you still think css is beautiful and are trying to help me
Ene Catalin
@EneCatalin
Jul 16 2018 15:05
because it's false
1 does NOT equal 2
it's supposed to return false
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:06
like your logic
Ene Catalin
@EneCatalin
Jul 16 2018 15:06
so what's that about making lil boys ?
Lazar Madžić
@LazarMadzic
Jul 16 2018 15:07
@EneCatalin i know that, but it auto checks for other values as well and it wont return true for (1,1)
Ene Catalin
@EneCatalin
Jul 16 2018 15:07
function checkEqual(a, b) {
return a === b ? true : false;
}
use that
function checkEqual(a, b) {
    return a === b ? true : false;
}
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:08
@EneCatalin lol how do you not know
Lazar Madžić
@LazarMadzic
Jul 16 2018 15:08
@EneCatalin thanks I switched true and false by accident
Ene Catalin
@EneCatalin
Jul 16 2018 15:08
if I could throw up a little I would, that scenario is :|
lol
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:09
@EneCatalin whaat? I long for finding the comic that got all the priests staying in line to order one lil AI boy
Ene Catalin
@EneCatalin
Jul 16 2018 15:12
children are eww
except for chucky but that's an adult serial killer doll
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:14
Chucky is just Chip Pemberton in future
Ene Catalin
@EneCatalin
Jul 16 2018 15:15
Chucky was traumatizing af. I thought my bunny doll would kill at night
def a movie to show to kids
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:15
lol. I have never ever
Ene Catalin
@EneCatalin
Jul 16 2018 15:16
cat was already like 40 by then so not really a child anymore
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:16
o_O
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:23
@anandpotukchi I had real CSS problem, man
Kyle Holm
@thekholm80
Jul 16 2018 15:31
function checkEqual(a, b) {
    return a === b ? true : false;
}
what does a === b return?
seems a bit redundant
Ene Catalin
@EneCatalin
Jul 16 2018 15:38
same as a == b ?
Kyle Holm
@thekholm80
Jul 16 2018 15:40
if (thisIsTrue) {
  return true;
else {
  return false;
}
// why not just
return thisIsTrue;
Ene Catalin
@EneCatalin
Jul 16 2018 15:40
now that you put it like that no idea
I didn't write that function, pretty sure it's pre-made by FCC
Kyle Holm
@thekholm80
Jul 16 2018 15:41
oh wtf i love writing 3x more code then needed
Ene Catalin
@EneCatalin
Jul 16 2018 15:42
I don't even use ternary operators
Kyle Holm
@thekholm80
Jul 16 2018 15:42
i do
Ene Catalin
@EneCatalin
Jul 16 2018 15:43
I am too dumb, always forget about it
Kyle Holm
@thekholm80
Jul 16 2018 15:43
nah, you just don't write js as much as other stuff
May Kittens Devour Your Soul
@diomed
Jul 16 2018 15:52
so ternary is better than binary?
Ene Catalin
@EneCatalin
Jul 16 2018 15:53
that's some highbrow humor right there
Smootimus
@Smootimus
Jul 16 2018 15:58
Had a terrible case of food poisoning last night I guess
It was really bad
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:34
whatttttttttttts wrong in this:
class ControlledInput extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: ''
    };
    // change code below this line
      this.handleChange = this.handleChange.bind(this)
    // change code above this line
  }
  // change code below this line
 handleChange (e) {
    this.setState ({
      input = e.target.input

    });
  }
  // change code above this line
  render() {
    return (
      <div>
        { /* change  code below this line */}
        <input type="text" onChange={this.handleChange} value={this.state.input} />
        { /* change code above this line */}
        <h4>Controlled Input:</h4>
        <p>{this.state.input}</p>
      </div>
    );

  }
};
Kaz Baig
@kbaig
Jul 16 2018 16:35
@anandpotukchi pretty sure it's supposed to be e.target.value
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:35
e is not defined
what does that mean
Kaz Baig
@kbaig
Jul 16 2018 16:36
you get undefined if you log e?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:36
yes
Kaz Baig
@kbaig
Jul 16 2018 16:38
@anandpotukchi this sounds crazy but try changing handleChange (e) to handleChange(e)
@anandpotukchi oh wait
input = e.target.input should be changed to input: e.target.input
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:41
@kbaig your linked is not very in
are u senior developer yet?
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:42
you were right about it @kbaig
Kaz Baig
@kbaig
Jul 16 2018 16:43
@diomed pshh not even junior developer
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:43
haha]
Kaz Baig
@kbaig
Jul 16 2018 16:43
I don't think I want to be one so it's fine :smile:
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:44
@kbaig how are u with css? coz @anandpotukchi wont help me
Anand Potukuchi
@anandpotukchi
Jul 16 2018 16:44
I didnt get your problem
Kaz Baig
@kbaig
Jul 16 2018 16:44
@diomed I can try
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:45
Kaz Baig
@kbaig
Jul 16 2018 16:47
err I know nothing about css doodle
Yago Estévez
@yagoestevez
Jul 16 2018 16:49
Hi everyone. Can anyone tell me where to find the repo where all tests are stored? Like the ones to pass Advanced Node and Express.
I'm having troubles passing a test and the code is fine (I tested it manually)
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:50
@yagoestevez what task?
Yago Estévez
@yagoestevez
Jul 16 2018 16:51
Let me check.
Logging a User Out
Sorry this one Logging a User Out
Shit
Registration of new users
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:53
@cmccormack
Yago Estévez
@yagoestevez
Jul 16 2018 16:53
My code is fine. I even copy pasted the suggested code
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:53
did u try to reset, reload, clean cache... etc
Yago Estévez
@yagoestevez
Jul 16 2018 16:53
So I wanted to look into the code and maybe contribute changing it
Christopher McCormack
@cmccormack
Jul 16 2018 16:54
@diomed wha
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:54
why u hang out with javascripters? join the dark side, be here :yum:
Ene Catalin
@EneCatalin
Jul 16 2018 16:54
we code in HTML here
Yago Estévez
@yagoestevez
Jul 16 2018 16:55
I will try that but I tried with another url from another camper complaining about the same issue and the same thing happened
May Kittens Devour Your Soul
@diomed
Jul 16 2018 16:55
such a fine programming language @EneCatalin
teh bestest
Christopher McCormack
@cmccormack
Jul 16 2018 16:56
Those fine gentlepersons in HelpJavaScript bring a level of class to my day that can't be found in other rooms
Kyle Holm
@thekholm80
Jul 16 2018 17:09
@cmccormack i cordially invite you to go fornicate with yourself, sir
Christopher McCormack
@cmccormack
Jul 16 2018 17:09
I said a level, not which level
Kyle Holm
@thekholm80
Jul 16 2018 17:10
haha fair enough
Christopher McCormack
@cmccormack
Jul 16 2018 17:14
I had no idea the true definition for Fornicate apparently
Anand Potukuchi
@anandpotukchi
Jul 16 2018 17:33
Does anyone know about outreachy internship
It says it is for
minorities
Kyle Holm
@thekholm80
Jul 16 2018 17:34

@cmccormack you mean

arched or vaulted: concave within, convex without.

Anand Potukuchi
@anandpotukchi
Jul 16 2018 17:34
But I'd it open for all?
Christopher McCormack
@cmccormack
Jul 16 2018 17:35
@thekholm80 haha
Manish Giri
@Manish-Giri
Jul 16 2018 19:23
@anandpotukchi I know Subheksha applied for it and got through
Yago Estévez
@yagoestevez
Jul 16 2018 19:25
@diomed Alright I just tried to pass the tests with a new private window. Still the same thing... :S
"I should be able to register and it direct me to my profile. CLEAR YOUR DATABASE if this test fails (each time until its right!)"
Anyone know where I can find the code for the tests?
Kyle Holm
@thekholm80
Jul 16 2018 19:31
@yagoestevez which challenge?
This one
I'd like to have a look at the code for the tests
Because some previous tests had issues too
Kyle Holm
@thekholm80
Jul 16 2018 19:33
i think testing is done differently now, i'm not sure if the tests are part of the public repo
Yago Estévez
@yagoestevez
Jul 16 2018 19:34
I guess not
Where all the failing tests' output are
But no don't know where to find all the code not just that json file
Smootimus
@Smootimus
Jul 16 2018 19:35
Dwarf Fortreeeeeess!!
the color yellow
@thecoloryellow5_twitter
Jul 16 2018 20:32
got it!