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
Toni Shortsleeve
@KoniKodes
@OrangeKulture Where's your home?
Tom
@moT01
@KoniKodes its in the html
i dont see a #shippingType though
Toni Shortsleeve
@KoniKodes
@moT01 That might be the issue. Sometimes calling from my html doesn't work. I have to call from javascript onclick function. I think it has something to do with when js loads.
Jorge
@flawedLogic506
@KoniKodes im from Costa Rica :palm_tree:
Toni Shortsleeve
@KoniKodes
@OrangeKulture Waikiki :-)
Currently in Carlsbad, CA
Tom
@moT01
it does seem to work, i added an alert before the if test and it fired
Jorge
@flawedLogic506
yeah i saw that .. havent been to Hawaii yet .. someday, hopefully
Toni Shortsleeve
@KoniKodes
@OrangeKulture It's a great place. I haven't been to Costa Rica yet either.
Jorge
@flawedLogic506
it is pretty nice down here, very relaxing
korzo
@korzo
@KoniKodes Also there is some massive memory leak, because when I'm playing, memory goes up to 3GB and then tab crashes.
Toni Shortsleeve
@KoniKodes
@moT01 Should it have "return function()" instead of only calling the function?
Tom
@moT01
that's probly not how i would have done it
Toni Shortsleeve
@KoniKodes
@korzo Really!? Thanks, I need to check that out.
CamperBot
@camperbot
konikodes sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 419 | @korzo |http://www.freecodecamp.com/korzo
Toni Shortsleeve
@KoniKodes
@moT01 Is Shipping type the shipping array for the 3 choices?
@korzo Did it crash on the first game, or on the reset?
Tom
@moT01
i assume it's supposed to be
Toni Shortsleeve
@KoniKodes
@moT01 I see what you mean. @bigyankarki You are validating on id='shippingType" but I can't find that id in the html.
Jorge
@flawedLogic506
u guys talking about the shipping form?
ahh ok i see the pen
Toni Shortsleeve
@KoniKodes
Yes
Jorge
@flawedLogic506
angular forms are solid .. i would probs do that
Toni Shortsleeve
@KoniKodes
It looks good. Just need to call the validation with id.
Can I see your tictactoe?
@OrangeKulture
korzo
@korzo
@KoniKodes I was trying to click as many as possible fields before computer (max is 5) so I assume it was like 7th or 8th game
Toni Shortsleeve
@KoniKodes
@korzo I feel better. I think it should only run 2 times to pass the user story.
Jorge
@flawedLogic506
@KoniKodes sry lost internet, yeah for sure .. im working on it, so it's kinda broken, but u can at least see the UI
forgot to set compturn to false, so it might work kinda weird on the first turn
Toni Shortsleeve
@KoniKodes
@OrangeKulture Yes, it places me in the middle before I begin. We seem to have similar logic. I like the different feedback you give to the user.
Marat
@Marat89bluolyu
Hi all. I need output array from function with interval 1 second one by one. Now in my code values output at once.
function arrayCounter(arr) {
    for (var i = 0; i<arr.length; i++) {
        (function (inner) {
            setTimeout( function() {
                console.log(arr[inner]);
            }, 1000)
        })(i);
    }
 }   

arrayCounter([1,2,3,4,5]);
Jorge
@flawedLogic506
nah the circle is the computer's turn .. it chose the middle one, then it 's supposed to be your turn
thanks a lot tho!, appreciate it .. still need to work on the check score and selection a little bit
i might settle for not making it unbeatable right now .. i mean, it's not a required user story and ive already spent a lot of time on this
@Marat89bluolyu setTimeout will only run once
Marat
@Marat89bluolyu
@OrangeKulture, yep but if we have a loop?
Jorge
@flawedLogic506
its best if u dont do functions inside loops
its a little bit of a leak
what u want is to output the content of the array, one by one, at 1 sec interval, yeah?
Marat
@Marat89bluolyu
@OrangeKulture yes
korzo
@korzo
image.png
@KoniKodes
Marat
@Marat89bluolyu
@OrangeKulture i want to get output: 1, then in one sec. 2 ... etc
Jorge
@flawedLogic506
if that is the case, then u wanna do:
let counter = 1;

let timer = setInterval(function(){
  console.log(arr[counter-1]);
  counter++;

if(counter>arr.length){
 clearInterval(timer);
}
},1000)
Toni Shortsleeve
@KoniKodes
@korzo Wow. Thanks for catching that. Still have some work to do..
CamperBot
@camperbot
konikodes sends brownie points to @korzo :sparkles: :thumbsup: :sparkles: