Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Gersho
@Gersho
i actually had made that on mine and ended up removing it and making it random, tictactoe is supposed to be a children's game after all
piteto
@piteto
@AdelMahjoub Your code reminds me how much I need to learn canvas :)
Adel
@AdelMahjoub
Still not sure of the rotation direction https://jsbin.com/wawijobohe/edit?js,output
@intcreate if you don't like the image above, you can search for a better tiles sheet
Fernando
@lestairon
Oh my
Gersho
@Gersho
@lestairon what part ? if a challenge seems hard, try to separate it in smaller chunks to see what part is giving you trouble
Fernando
@lestairon
I don't know how to do a share button and where should i take the random quotes
I'll try to do it
Wish me luck
Claudio Restifo
@Marmiz
@lestairon For starter you don't need to pull the quotes from an API, you can simply create an Array of quotes and then pull out one at random.
After that simply switch from picking it one up from local to an API :)
Fernando
@lestairon
I'd like to do it using an API
To know how it works
Bryan Reese
@breese8009
heyyy whats this ~~ mean in JS?
Fernando
@lestairon
Uh, @Marmiz Can i create an API using google sheets?
Wait, maybe i don't know exactly how that works, but i saw a video doing that but with Python
Fernando
@lestairon
Nvm, that's not an API
It's a Database
Claudio Restifo
@Marmiz
@lestairon yep :)
An API is different... you can create one for sure :)
How good are you at back end?
silver537
@silver537
You use the same technique on the database as if you would using an api
Claudio Restifo
@Marmiz
@breese8009 ~ is a negative bitwise operation in JS... so I assume ~~ is a double bitwise so maybe a double negative operation?
I guess it just remove the decimals at this point.... kinda like Math.floor()... but not sure at all.
Never saw it nor used it
rafaelmonroy
@rafaelmonroy

@rafaelmonroy
hey guys what value can I set my data.stream equal so that my else if statement returns my desired info?

$(function(){
  var users = ["ESL_SC2", "freecodecamp", "noobs2ninjas", "realisticgamingyoutube"];
  var i = 0;
  while (i<users.length){
   $.ajax({
    type: 'GET',
    url: 'https://wind-bow.glitch.me/twitch-api/streams/'+users[i]+'/',
    success: function(data) {
      if (data.stream === null){
        console.log('offline')
        } else if (data.stream === true){
        console.log(data.stream.game + ', '+data.stream.stream_type)
        }     
      }
    })
    i++
  } 
});

it works when I remove the else if statement and just leave as an else statement, but am curious to know what value i can enter with an else if statement

Ogundele Olumide
@Lumexralph
@rafaelmonroy what if you do
if (data.stream )  {
   console.log(data.stream.game + ', '+data.stream.stream_type)
}   else {
       console.log('offline');
}
rafaelmonroy
@rafaelmonroy
@Lumexralph yeah that works but I want to know if possible with an else if statement
Ogundele Olumide
@Lumexralph
@rafaelmonroy you can but it'll be a kind of repetition else if (data.stream)
did you try that?
rafaelmonroy
@rafaelmonroy
yeah this worked
if (data.stream === null){
        console.log('offline')
        } else if (data.stream){
        console.log(data.stream.game + ', '+data.stream.stream_type)
        }
Ken Haduch
@khaduch
@rafaelmonroy - null should be coerced to false so if your data.stream is not null, then i think you should be able to do else if (data.stream) { ? Which would essentially be the "else" statement.
Ogundele Olumide
@Lumexralph
@rafaelmonroy what values will be in data.stream ?
rafaelmonroy
@rafaelmonroy
@khaduch @Lumexralph yeah that worked guys, but I guess it is just repetition. Thanks!
CamperBot
@camperbot
api offline
api offline
rafaelmonroy sends brownie points to @khaduch and @lumexralph :sparkles: :thumbsup: :sparkles:
Ogundele Olumide
@Lumexralph
@rafaelmonroy yeah
cbot still on hols
CamperBot
@camperbot
you called?
rafaelmonroy
@rafaelmonroy
@camperbot ?
Ogundele Olumide
@Lumexralph
have fun while brownies are thrown into space
rafaelmonroy
@rafaelmonroy
whats up with the camper bot api offline?
Ogundele Olumide
@Lumexralph
@khaduch looking at your profile pic.... should I say father or grandpa ?
@rafaelmonroy FCC can answer that
Ken Haduch
@khaduch
@Lumexralph - grandfather for the second time...
Ogundele Olumide
@Lumexralph
@khaduch awesome :clap:
Fernando
@lestairon

@Marmiz I don't anything of Back end yet

@lestairon yep :)
An API is different... you can create one for sure :)
How good are you at back end?

Markus Kiili
@Masd925
Browzniez are in space now?
Gersho
@Gersho
we're on forced diet
Fernando
@lestairon
Uh, i have a good idea for my Pen, but i don't know how can i do it
I'd like to have almost anything on the Html, and then add some things with Javascript, is that possible?
Ogundele Olumide
@Lumexralph
@Masd925 lol.... Good Morning
Fernando
@lestairon
Maybe using $(document)
Gersho
@Gersho
@lestairon you can give id to your html elements, and then modify them with $("#id").html("blabla") (or .append depending on your need)