Learn the JavaScript DOM With This Project - Memory Game

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • View the SOURCE CODE:
    dcode.domenade...
    The best way to learn the JavaScript DOM is to build something with it. In this video, we'll be building a memory game.
    🏫 My Udemy Courses - www.udemy.com/...
    🎨 Download my VS Code theme - marketplace.vi...
    💜 Join my Discord Server - / discord
    🐦 Find me on Twitter - / dcodeyt
    💸 Support me on Patreon - / dcode
    📰 Follow me on DEV Community - dev.to/dcodeyt
    📹 Join this channel to get access to perks - / @dcode-software
    If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
    #dcode #javascript

ความคิดเห็น • 29

  • @dcode-software
    @dcode-software  ปีที่แล้ว +2

    *MORE JAVASCRIPT PROJECTS* 👇
    th-cam.com/play/PLVvjrrRCBy2KvTPJ-HLG4PRqYf-MVJ0h7.html
    *ENROL IN THE ULTIMATE JAVASCRIPT DOM CRASH COURSE* 👇
    www.udemy.com/course/the-ultimate-javascript-dom-crash-course/?referralCode=DC343E5C8ED163F337E1

  • @justinstewart3060
    @justinstewart3060 4 หลายเดือนก่อน

    I have watched this video and rewatched this video. I learned alot from this project. I have made simple projects like "to-do lists" and such but I haven't used "return" hardly at all. This project really showed me how to use the "return" statement and "true/false" statements. I made this project 3-4 different times. Had to keep watching parts of your video when I would get stuck but I eventually made it on my own. Everything seems very simple eventually once you learn why things are doing what they are. Thanks for the video, your way of teaching is awesome, keep it up!

  • @yoonei5373
    @yoonei5373 24 วันที่ผ่านมา +1

    ur teaching method is really good
    thanks😍

  • @kubataiupov1245
    @kubataiupov1245 2 หลายเดือนก่อน

    Nice and helpful video. Thank you man!

  • @gabebott9254
    @gabebott9254 ปีที่แล้ว +1

    Great tutorial for a beginner. I am having trouble with the game not letting me click on more tiles after the initial 2 disappear. What do you think could be causing this?

    • @JohnCoffeyLikeTheDrink
      @JohnCoffeyLikeTheDrink 10 หลายเดือนก่อน

      You probably already solved it, but looking at console it says theres a problem with line 75 in java script

  • @alhamdulilah6892
    @alhamdulilah6892 ปีที่แล้ว

    Amazing tutorial, really needed this to practice Js, Thanks Dom!

  • @rigohernandez1770
    @rigohernandez1770 ปีที่แล้ว

    On line 13 (time 11:16), you used colorsPicklist.length. Isn't this equivalent to tileCount which is declared on line 4?

  • @valenciawalker6498
    @valenciawalker6498 5 หลายเดือนก่อน

    Thank you!

  • @xbox360fan1956
    @xbox360fan1956 11 หลายเดือนก่อน

    18:16 when I add the event listener it only changes the last colour regardless of what tile I click on. I can't click on any other tiles after the last colour has been revealed.

    • @xbox360fan1956
      @xbox360fan1956 11 หลายเดือนก่อน +1

      Update: I didn't use your method but somehow after copying and pasting random code I got it to work.
      It is now 4am and I crushed 3 energy drinks. I also have no idea what I'm doing with my life. Is this how software development works?

  • @CrazyAshu34
    @CrazyAshu34 ปีที่แล้ว +1

    could you tell me your Vs Code theme Name_🙆

  • @znkdev
    @znkdev ปีที่แล้ว

    nice! what is this extension that you type .classname and add a div

    • @dcode-software
      @dcode-software  ปีที่แล้ว +3

      Hey. It's part of VS Code. No extension needed 🙂

    • @znkdev
      @znkdev ปีที่แล้ว

      @@dcode-software mine doesn't do it, I'll check it again. TY

  • @ajayathapa8251
    @ajayathapa8251 ปีที่แล้ว

    How did you get more tha 8 colors after splice??? When using splice it detuct 1 element. So, usng for loop it delete 8 color element. Plz explain???

    • @dcode-software
      @dcode-software  ปีที่แล้ว +1

      Hey, I'm not sure. Just make sure that you've copied the code exactly from what's on the video. You can also download the code by visiting the link in description if you need.

    • @darthchris623
      @darthchris623 ปีที่แล้ว

      @@dcode-software I had the same problem. The splice doesn't work. JS only prints 8 colors. Furthermore, I got 3 of the same color.

    • @nikolalazic3077
      @nikolalazic3077 9 หลายเดือนก่อน

      @@darthchris623 @ajayathapa8251 you are better off using a shuffle function. If you dont know how to do it, just google "javascript shuffle" and look to stack overflow, some guy made a good function for it. You wanna then remove the index in the for loop and make a variable to store the shuffled array outside of the loop
      IK you most likely solved this but this is for any newbie that has trouble with this as well

  • @86_magical30
    @86_magical30 ปีที่แล้ว

    Why are you using functional programming I thought your signature was OOP ?

    • @dcode-software
      @dcode-software  ปีที่แล้ว

      Hey, not all the time. I aimed this video toward beginners who'd probably find functional programming a bit simpler. Besides, no harm in functional programming 😎

  • @TsoiIzAlive
    @TsoiIzAlive ปีที่แล้ว +4

    Dom teach me the DOM

    • @dcode-software
      @dcode-software  ปีที่แล้ว +2

      😎 that's right

    • @TsoiIzAlive
      @TsoiIzAlive ปีที่แล้ว +2

      @@dcode-software To make this project better once its finished is, one could add a button that resets all the tiles and variables. Its a good practice instead of smashing a location.reload() on the button.

  • @techballerina
    @techballerina 11 หลายเดือนก่อน

    doesnt seem to workout for me in intellij.

  • @darthchris623
    @darthchris623 ปีที่แล้ว

    I don't understand how awaitingEndOfMove and activeTile work. From my point of view, they are 'empty' variables. They shouldn't work.

  • @JVM-ok5eg
    @JVM-ok5eg 6 หลายเดือนก่อน

    Dom teaching DOM 😂😂