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
Jean-Paul Sauve
@jp-sauve
can you add a property to an undefined variable? Maybe initialize move to an empty object
korzo
@korzo
@Teo03 callAi() is not defined in global scope, but inside ready() function's callback
you can access it from console
Teo
@Teo03
@jp-sauve like this var move = {}; ?
korzo
@korzo
@Teo03 unless you assign it to window object
Jean-Paul Sauve
@jp-sauve
yes, but I don't know if that's the issue.
Teo
@Teo03
@korzo what should i type in console to call?
@jp-sauve I tried now it still doesen't work
korzo
@korzo
@Teo03 you need to assign it to window object: window.callAi = callAi;
@Teo03 In the console window, there is dropdown on left top side. Select Codepen iframe there
@Teo03 as long as you use Chrome
Teo
@Teo03
@korzo There is nothing on the top left
korzo
@korzo
image.png
@Teo03
Teo
@Teo03
@korzo it says GET https://www.google-analytics.com/analytics.js net::ERR_BLOCKED_BY_CLIENT
Alexander Domikov
@AlexanderDom
if its blocked by client so it adblock or something like tihs :)
Teo
@Teo03
I disable it but still doesen't run
Alexander Domikov
@AlexanderDom
same js error ?
Teo
@Teo03
yes
I fixed it now but now shows that callAi is not defined
Jean-Paul Sauve
@jp-sauve
@Teo03 Ok, it looks like the if condition on line 48 is always true?
which means that nothing after the return ever gets evaluated
hmm...it looks like codepen is stopping an infinite loop by overwriting your logic.
Jean-Paul Sauve
@jp-sauve

I get "unreachable code after return statement", at index.html 174:8 and when I click on the index.html link in the console, it brings me to that line of your code around 80-83, but shows the inside of your function as

        //check if there is empty place
        for (var i = 0; i < 3; i++) {if (window.CP.shouldStopExecution(6)){break;}
            for (var j = 0; j < 3; j++) {if (window.CP.shouldStopExecution(5)){break;}
                if (searchBoard[i][j] === ' ') {
                    return false;

@Teo03

Teo
@Teo03
What should I do to fix this?
Jean-Paul Sauve
@jp-sauve
I'm not sure, sorry. You could step through with a debugger. It's hard, not having written it, plus I don't have enough time right now. But that's at least one of the issues!
oh, and sorry, it's a bit farther down than 48. It's the bit around 80
yeah, I don't see the infinite loop there...
Spyrantis Theodoros
@thodorisanta

whats the easist way to position everything in the inner circle perfectly? should i use bootstrap or something else?

https://codepen.io/oshikurou/pen/mBNVKM?editors=1100

Nkwazema Chidiebere Raphael
@KingCyrus
Anyone free to help me am stuck with making a modal with react on the Recipe box react project https://codepen.io/SensePrompt/pen/EwzPKV?editors=0010
Ken Haduch
@khaduch
@KingCyrus - are you familiar with the react-modal plugin? I don't know how easy it is to use on CodePen, but the udemy React course that I am going through used that to create a Modal element in the example project. It seemed to work nicely.
Brittany Rutherford
@brittanyrutherford
hi all, when do I need to change the size of h1, h2 ,etc
Nkwazema Chidiebere Raphael
@KingCyrus
@khaduch no I haven’t used it. How do I start?
@khaduch which of the react course? I am signed onto Colt Steele Advanced web dev course and it teaches react.js but I haven’t gone through it all.
Richard
@rylew0925
How come this code only return "${this.name} says hello! " instead of "Miki says hello!"?
let myObj = {
    name: 'Miti',
    sayHello() {
        return '${this.name} says hello!'
    }
};
console.log(myObj.sayHello());
Nkwazema Chidiebere Raphael
@KingCyrus
you should use ` not ‘ @rylew0925
Ken Haduch
@khaduch
@rylew0925 - you might have to write that as ${this}.name + ' says hello!' unless you are supposed to be using the string template, as @KingCyrus is pointing out? As you have it pasted in there, it is just a string, so nothing within the string is evaluated.
Nkwazema Chidiebere Raphael
@KingCyrus
@khaduch could you kindly give me the link to the course so I sign on?
Richard
@rylew0925
You mean I'm supposed to be using ` and not ' ?
For strings?
Ken Haduch
@khaduch
@KingCyrus - sure - it is the https://www.udemy.com/react-2nd-edition/learn/v4/content "The Complete React Web Developer Course (2nd Edition)".. But unless you want to sign up for another course and pay for it, if you just look for the "react-modal" plugin, it might give you enough to go on, since you have react experience? https://github.com/reactjs/react-modal is the link to the modal on github
Nkwazema Chidiebere Raphael
@KingCyrus
yes @rylew0925
Lee
@LeeConnelly12
@rylew0925 When you include variables in strings with ${this.name} you do
Ken Haduch
@khaduch
@rylew0925 - are you using ES6 features (template strings), or just standard javascript strings?
Richard
@rylew0925
It's that symbol between the Esc and the Tab keys?
ES6
Nkwazema Chidiebere Raphael
@KingCyrus
thanks @khaduch I have react experience
CamperBot
@camperbot
kingcyrus sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3426 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
@KingCyrus - I see that you do have React experience, since you are working with react. I just wondered if you would be able to utilize that react-modal just looking at the document and attempting to incorporate it in your project... and not have to sign up for yet another course. good luck with that!