Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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
John Nunns
still says amount is not defined
JD Tadlock
@fortMaximus this is a typical way of first clearing the old results then adding the new:
var output = $('.output');


  '<a href="wiki link">' +
    '<h3>' + data.title + '</h3>' +
    '<p>' + data.content + '</p>' +
the append would be in the data iteration of course
you would loop through the returned object and append each link
@johnnunns You left this line out that goes above output = amount....
 amount = str.match(regex).length,
you don't need the if (str.length.....) line
the reduce will return an empty object if the string is empty automagically
John Nunns
that one works!
yeah added it just so I could pass one of the tests it wasnt passing
yeah still it actually doesnt work without if statement
{ '': 1 }
it's counting
Abdijabar Yussuf Mohamed
Any hint on how I can better show "my copyright " and link my tribute page to an external website
JD Tadlock
have you looked up ternaries yet? @johnnunns
John Nunns
nope I will though
JD Tadlock
that's what i'm using to do that ? blah : something
those are called ternary expressions
it's just a shortcut way of doing if/else
condition ? true : false
that's how it works
Abdijabar Yussuf Mohamed
Any hint on how I can better show "my copyright " and link my tribute page to an external website : https://codepen.io/aymohamed/pen/egWgmQ
JD Tadlock
lol @aymohamed
You can add padding and background to the copyright
and just add a hyperlink
<a href="https://google.com" target="_blank">Google</a>
Abdijabar Yussuf Mohamed
does that mean I use a div class ?
JD Tadlock
just add a class to the div wrapping the copyright
and use that class in the css
Abdijabar Yussuf Mohamed
Ok. Let me try that and I will get back to you. @ JD Tadlock. Thanks
@jdtdesigns, can the wrapper class have any name or just "container" etc?
JD Tadlock
it can be any name @aymohamed
they need to be space separated
<div class="my-class row another-class one-more"></div>
Abdijabar Yussuf Mohamed
Ok. Thanks @jdtdesigns .I am doing that now
aymohamed sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 879 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
@jdtdesigns Thank you for help and spending the time writing the code :smile: Although I didn't ask about the "clearing" part but you knew I'm gonna' ask about later, right? ;) :p
fortmaximus sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 880 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
and thanks @RitvarsZ
fortmaximus sends brownie points to @ritvarsz :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @ritvarsz |http://www.freecodecamp.com/ritvarsz
JD Tadlock
@fortMaximus right ;)
@johnnunns To fix the result outputting an object with a space, you can just return this inside the reduce callback instead
return str ? result : {}
abhijith shenoy
whats wrong with my weather app
it was working f9 till yesterday
Abdijabar Yussuf Mohamed
Please let me know what y'all think of this : https://codepen.io/aymohamed/pen/egWgmQ
Constructive criticism is welcomed