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
Gary Siu
@GarySiu
Went back to your pen and it stopped
Nathaniel
@DeathStarGnR
@GarySiu weird.
Gary Siu
@GarySiu
hmmmmmm
console.log(randNum); gives NaN
Math.random is a function
Math.floor won’t work on it
Math.random() will give a number between 0 and 1. Math.floor would convert that to 0
Maybe the console.log makes it evaluate and then the API handles it? :P
Nathaniel
@DeathStarGnR
good point. I'm not sure the randNum is necessary. It seems to function the same without it. I will fix it though and see what happens.
Gary Siu
@GarySiu
@DeathStarGnR You probably intended this: var randNum = Math.floor(Math.random() * 100);
soroush behmardi
@soori8
hi, I'm in Build a Random Quote Machine project But i don't know where can i have a Quote API.
Gary Siu
@GarySiu
There are a lot of different quote apis. Do you have any interests?
Nathaniel
@DeathStarGnR
@GarySiu OMG i think that fixed it!!!
Gary Siu
@GarySiu
The random number or not using the random number?
Nathaniel
@DeathStarGnR
@soori8 I am using the Quotes on design Api. it seems to be doing well. Had some trouble with forismatic.
Peter Kenward
@PeterKenward
Nathaniel
@DeathStarGnR
@GarySiu with the random number, correcting the syntax.
Gary Siu
@GarySiu
I seen a few people use this one: http://www.icndb.com/api/
Nathaniel
@DeathStarGnR
@soori8 https://quotesondesign.com/api-v4-0/ the link to the one I am using
@GarySiu who would have thought a couple of little parentheses could cause so much trouble. lol.
soroush behmardi
@soori8
@PeterKenward @DeathStarGnR thanks so much
CamperBot
@camperbot
soori8 sends brownie points to @peterkenward and @deathstargnr :sparkles: :thumbsup: :sparkles:
:cookie: 282 | @deathstargnr |http://www.freecodecamp.com/deathstargnr
:cookie: 285 | @peterkenward |http://www.freecodecamp.com/peterkenward
Gary Siu
@GarySiu
@DeathStarGnR It happens a lot when you’re starting out. Backtrack and check your values are what you think they are with devtools/console.log
Nathaniel
@DeathStarGnR
@soori8 any time. @GarySiu good advice. gonna take a break for a while. Thank you so much.
CamperBot
@camperbot
deathstargnr sends brownie points to @soori8 and @garysiu :sparkles: :thumbsup: :sparkles:
:cookie: 19 | @soori8 |http://www.freecodecamp.com/soori8
:cookie: 163 | @garysiu |http://www.freecodecamp.com/garysiu
soroush behmardi
@soori8
Jeff Dera
@jeff-dera
I'm having the same issue as @soori8
Nevermind, I appended a random number after the callback="
before the function
seems to work now
soroush behmardi
@soori8
@Evercleared yeah its work, thaks
Liman Abba
@limanCode
Hi guys, please help me look at this, the navbar is overflowing to the jumbotron, what could be wrong here? http://codepen.io/limanCode/pen/XKBNgg
any body here?
Gary Siu
@GarySiu
@limanCode I don’t get the same problem as you?
Or you fixed it already
Ken Haduch
@khaduch

@limanCode - if you are using navbar-fixed-top (or were using it) you have to add some margin-top to the body element so that the page content shifts down. I added that class (you might have had it and removed it?, navbar-fixed-top) and then added this to the CSS:

body {
  margin-top: 120px;
}

If you make your navbar shorter, then you can use a smaller margin-top. That nav class padding that you are adding is making the navbar extra tall.

dimitrije12
@dimitrije12
can someone help me with javascript part
what did i do wrong?
Liman Abba
@limanCode
@khaduch Thanks. I understand.
CamperBot
@camperbot
limancode sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1495 | @khaduch |http://www.freecodecamp.com/khaduch
Liman Abba
@limanCode
@GarySiu see the solution above.
John Doe
@codingisfun11
function myLocalScope() {
  'use strict';


  console.log(myVar);
}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope


// Now remove the console log line to pass the test
i removed the console long line...now what to do?
I pressed run but the program wont work.