Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
noobstar
@namsir
@khaduch can you help pointing to the right direction?
Ken Haduch
@khaduch
@namsir - have you used .reduce() for any other purpose, or is it a new method for you? You can read the MDN documentation on it, of course, and I found this article from the forum to be helpful to me. It took a little while for me to get my head wrapped around how it works.
noobstar
@namsir
@khaduch thanks i'll give it a read
CamperBot
@camperbot
namsir sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3482 | @khaduch |http://www.freecodecamp.com/khaduch
Kevin K. Lee
@kevinkiklee
i agree with ken. recursion is not the best for this. also, imo, i think using filter would be the best for what you want to achieve. it is def solvable with reduce though.
also, take the time to master reduce. it's the swiss army knife. there are so many things you can do with it. any time you have to derive a value from a collection, or transform a collection into a different structure, def look at reduce first.
noobstar
@namsir
@kevinkiklee going to master reduce :D
BuntyBru
@BuntyBru
I am trying to toggle from F to C in the weather APP but i am not able to
I tried boolean too but again it did not happen.
WHat am i doing wrong here.
Please tell
alpox
@alpox
@BuntyBru because the variable c is initialized with 0 directly before the if, it will always be 0 when reaching the if statement which tests it. Each call to the event handler will create a new variable c. It does not persist over multiple calls.
BuntyBru
@BuntyBru
if i declare "c" outside then some other problem comes up
Christopher Susi
@chrisandsuch
@heroiczero thank you so much for the advice. I’ll check those out soon.
CamperBot
@camperbot
chrisandsuch sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2038 | @heroiczero |http://www.freecodecamp.com/heroiczero
Stephen James
@sjames1958gm
@BuntyBru Declare a global boolean rather than integer.
var celsius = true;
Then in the function you can do
if (celsius) {
   // change to F
} else {
  // change to C
} 
celsius = !celsius;
alpox
@alpox
@BuntyBru in the if statement for the status: `this.readyState=
this.readyState=4 is the error then
You need == for it to be a condition
Your eventhandler was added twice because the if condition was not right. Therefore your click always executed the function for the change of f/c twice
Stephen James
@sjames1958gm
@alpox :+1:
in this quote tweet is ok?
i mean the tweet button is working good ?
A-J Roos
@Asjas
@1532j0004kg No. You don't link directly to twitter. You need to add the quote to the button and send that to twitter
All that button is doing is opening twitter
No the button is not correct
If I click on it it must create a tweet with the quote inside it.
dinesh
@1532j0004kg
how can i do it give me a tips
tip
A-J Roos
@Asjas
@1532j0004kg You use http://twitter.com/home?status= as the base URL and then add the quote and a link to the quote to that URL
If someone then clicks on the button it will open up twitter with a new tweet containing the quote and the link to the quote
dinesh
@1532j0004kg
i willl try
A-J Roos
@Asjas
You can try https://twitter.com/intent/tweet?text= as well. I see my first link redirects to this one
BuntyBru
@BuntyBru
@sjames1958gm @alpox
Wait i am trying
is it okay?
it threw the error.
A-J Roos
@Asjas
@1532j0004kg Not okay. Nowhere are you setting the twitter url? Please set the url to https://twitter.com/intent/tweet?text= and then add the quote and link
dinesh
@1532j0004kg
https://twitter.com/intent/tweet?text= where this url need to be ? in the button or anywhere ?
A-J Roos
@Asjas
That is the href link for the a tag
That link + the quote + the link makes up the href
dinesh
@1532j0004kg
ohh ok i will try
BuntyBru
@BuntyBru
@sjames1958gm @alpox
Its working but after 3 clicks
things go haywire
trying to make it work
BuntyBru
@BuntyBru
Its working now
Christopher Susi
@chrisandsuch
Hey all, for projects do you often use the same stylesheet languages for all of them? For instance once you learn SASS SCSS do you just use that or still go back to CSS for simple projects?
BuntyBru
@BuntyBru

@alpox

could you explain about the "this.readyState==4 " you were talking about

Please , that would be so kind of you
刘刚
@dsfdsfdsf123
hello everyb,good night