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
Edmund To
@edmundtfy
@GregatGit sorry I just typed that up, I used array.length in the code
Greg Duncan
@GregatGit
@max77p If they are online when you do the call - then everything you need is brought down in that call - you can also access the channels api if they are offline through that call
@edmundtfy where is array defined
Edmund To
@edmundtfy
@GregatGit before everything, at the very top
Greg Duncan
@GregatGit
@edmundtfy are you doing this in code pen
Edmund To
@edmundtfy
yes doing it in codepen as part of the Twitch.tv application
Greg Duncan
@GregatGit
@edmundtfy can you post your pen
it's a bit of a mess..... @GregatGit
Greg Duncan
@GregatGit
Tidy.JPG
@edmundtfy don't forget to use the tidy button
@edmundtfy your naming in general is not good - one good example tho is pushHtml - I know exactly what it does just by reading the function name
@edmundtfy What is your main problem right now?
max77p
@max77p
@GregatGit hey so i know using chromes console that my code is pulling info on the array of names i requested
however, for simplicity purposes all i am trying to do right now is output the status name of whatever is online, and then just output "offline" for whatever is offline on the page
or into my div
having a little trouble doing this though
i get the online status names to output, but not sure how to work the if statement so that the word "offline" is output below the two for the other ones
Edmund To
@edmundtfy
@GregatGit the entire thing being pushed to the HTML is wrong, you can't see it in your computer?
@GregatGit everything overlap on the same row, and everything being pushed is the same...
Greg Duncan
@GregatGit
@edmundtfy I think you have made your pushHtml function to complicated
it should be simple
instead of using lots of jQuery to add classes and attribute - build a block of html like a string - then add (append) the block -
Greg Duncan
@GregatGit
@edmundtfy a basic example
function buildHtml(img, class, address){
   var myHtml = '<div class="' + class + '">';
   myHtml += <a href="' + address // and keep building it

$("#channels").append(myHtml);
}
Greg Duncan
@GregatGit
@max77p if (json.hasOwnProperty('error') check for errors (do nothing but console it if its there are there 'else if' check if(json.data === null) - now you know its offline - 'else' - its online
Edmund To
@edmundtfy
@GregatGit you are right I got it to go into the right format, but still, duplicating the same result...
Edmund To
@edmundtfy
@GregatGit seems like the variables aren't resetting: after I declare a certain value to a variable, it sticks for the first loop and doesn't change after the first loop...
Ben Elliot
@SuperNerd1
How do I create a set of radio buttons? So far i have:
Greg Duncan
@GregatGit
make your function take in parameters @edmundtfy
Ben Elliot
@SuperNerd1
<radio><input type="radio"name="indoor"> indoor</radio>
<radio><input type="radio"name="outdoor"> outdoor</radio>
Greg Duncan
@GregatGit
Ben Elliot
@SuperNerd1
@GregatGit Thanks!
CamperBot
@camperbot
supernerd1 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 696 | @gregatgit |http://www.freecodecamp.com/gregatgit
Edmund To
@edmundtfy
@GregatGit what do you mean let the function take in parameters? I declared global variables, change the value in the functions, and push to the HTML, and the second loop I also set a new value to the variables, but seems like not working
Greg Duncan
@GregatGit
@edmundtfy
myFunction(str){
  var greeting = "Hi " + str + "!";
  return greeting;
}
@edmundtfy also declare variable where you need them - not globally
Nupur Gorian
@NupurGorian
what is unexpected token indent in html
????????????
hi @edmundtfy
john94
@lpy1994
hello
Screen Shot 2016-07-18 at 10.37.57 PM.png
how can I put them in line??
Edmund To
@edmundtfy
@GregatGit sorry, but why can't I declare it globally? If I declare it non-globally, then the other function would not be able to grab those variables right? I have 3 functions, so I decided to declare them globally. Not a good practice?
@NupurGorian hello there~
Nupur Gorian
@NupurGorian
hello
pooranp
@pooranp

How can I add links to my portfolio? I tried going back in the previous lessons but couldn't find an answer

'User Story: I can click different buttons that will take me to the portfolio creator's different social media pages.'

Nupur Gorian
@NupurGorian
I want to know about unexpected token in html.It is an error showing in my tribute page