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
ExpressyCode
@ExpressyCode
@khaduch Ye it did work, thanks :+1:
CamperBot
@camperbot
expressycode sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3897 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
@ExpressyCode - I don't see where you are adding in the search term, though?
Thomas Tylek
@zippkidd
@khaduch Thanks for pointing that out, I didn't know. @ExpressyCode sorry about the wrong info
CamperBot
@camperbot
zippkidd sends brownie points to @khaduch and @expressycode :sparkles: :thumbsup: :sparkles:
:star2: 3898 | @khaduch |http://www.freecodecamp.org/khaduch
:cookie: 266 | @expressycode |http://www.freecodecamp.org/expressycode
Nate Mallison
@NJM8
@ExpressyCode Also you might want to add a search button, right now you are performing a search everytime the users types a key
ExpressyCode
@ExpressyCode
@khaduch haven't done that yet. Just trying to get a return first:) But now it works. So I can working on it now.
@zippkidd np!
@NJM8 Ok I will read a little about that. But as I understand your have to use async await etc when your using a function. I don't need to if I do it directly in the addEventListener function. I can be wrong! Thanks for pointing it out.
CamperBot
@camperbot
expressycode sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 426 | @njm8 |http://www.freecodecamp.org/njm8
Nate Mallison
@NJM8
Sure thing, hope it helps, I'm sure there are many ways to do it
ExpressyCode
@ExpressyCode
@NJM8 How would you write the function? If you have time to show :)
Nate Mallison
@NJM8
in my link above to my github
your async function calls the await, which calls the api with a new Promise
although I haven't done it with fetch, I think it would be the same
personally in my project I just used new Request(url), fetch (url) .then(success).catch(error)
function getQuery(query) {
    const request = new Request(url goes here);

    fetch(request).then(function(response){
      return response.json().then(function(data){
      // do work
        }
      })
    }).catch(error => {
      console.log(error);
    })
}
ExpressyCode
@ExpressyCode
@NJM8 Oh ok so you mean I should do the .then and .catch directly in the function instead of returning it?
@NJM8 XMLHttpRequest and fetch is pretty new to me.
Nate Mallison
@NJM8
correct
ExpressyCode
@ExpressyCode
@NJM8 Ok I see, I will try some different approaches to see what I like the most. But in a time matter, using .then .catch directly in the function is best?
Nate Mallison
@NJM8
if not using async await
very clean
ExpressyCode
@ExpressyCode
@NJM8 Thanks :)
CamperBot
@camperbot
expressycode sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
api offline
matthewlee07
@matthewlee07
can anyone help me with deleting something from a list? it's not as straight forward as the hero app
Thomas Tylek
@zippkidd
@matthewlee07 Are you trying to delete an entire <li>?
matthewlee07
@matthewlee07
yes
Thomas Tylek
@zippkidd
Does it matter which one? The first one? The last one?
matthewlee07
@matthewlee07
but it's a child and not exactly in an array
on event
could I show you my repo?
Thomas Tylek
@zippkidd
Sure
var p = document.getElementById('listID');
p.removeChild(p.getElementsByTagName('li')[0]);
^that would remove your first <li> of the <ol id="listID">
I need the delete to work, and the way I have it currently reloading the page doesn't seem like a good fix
Thomas Tylek
@zippkidd
Hmm I'm not experienced in angular but I'll take a look
br3ntor
@br3ntor
What happened to the main fcc gitter chat room? /freecodecamp
just me? or did it go away?
Thomas Tylek
@zippkidd
@matthewlee07 where is your deleteGame() function located?
Hmm actually I found it..