How to Build Tic Tac Toe with JavaScript, HTML and CSS - Tutorial

Sdílet
Vložit
  • čas přidán 27. 08. 2024
  • In this video we are going to make the classic game Tic Tac Toe using JavaScript HTML and CSS. Throughout this tutorial we will touch on many topics.
    CSS topics such as: How to create a Tic Tac Toe board using CSS grid layout. Css positioning with absolute. We will also be using flex layout in several areas of the application.
    JavaScript topics such as: How to access and manipulate HTML elements from JavaScript, Arrow functions, destructuring objects, event handling(click event), arrays, adding sound via the Audio class and much more.
    I will also touch on a few productivity tips in VS Code such as multiple cursors and using the live server extension.
    I hope that you enjoy the tutorial. If you do please subscribe like and share.
    GitHub Link:
    github.com/Cod...
    Try it here
    codingwith-ada...
    Destructing objects tutorial:
    • Destructuring javascri...

Komentáře • 30

  • @Chuckler127
    @Chuckler127 Před 2 lety +7

    Thanks for doing a video like this! I'm currently training to become a brand new web developer with HTML, CSS, and JS. I'm still in the middle of learning all the basic fundamentals, but after watching this video all the way through I can finally see how all the fundamental building blocks of the languages can come together and produce a complete game like this. It's really helped make a lot of stuff finally "click" as I continue to study!

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +2

      You’re welcome! I’m really glad to hear that this video is helping! Congratulations on your journey to become a web developer! Keep on practicing and learning!!!

  • @itachimollett6860
    @itachimollett6860 Před 2 lety +9

    So underrated, your videos helped me a lot throughout my coding experiences, thank you very much!

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +2

      Thank you Dominic! I really appreciate your comment. It’s comments like yours that keep me going on CZcams! I’m really happy the tutorials are helping.

  • @samiyi4896
    @samiyi4896 Před 5 měsíci +2

    This helped so much, Thank You Adam. Very easy to follow!!

    • @CodingWithAdam
      @CodingWithAdam  Před 5 měsíci +2

      You’re welcome! Glad the tutorial was helpful and easy to follow 😁

  • @sora4kairi2
    @sora4kairi2 Před rokem +2

    Thank you so much for this! I have an assignment to create a tic tac toe game and your vid is a great guide for my understanding!

    • @CodingWithAdam
      @CodingWithAdam  Před rokem +1

      You’re welcome! I’m really glad the video helped with your assignment.

  • @unanimous8510
    @unanimous8510 Před 2 lety +6

    Very cool video, Adam. Great explanation and overall good job 👍

  • @secydon
    @secydon Před rokem +2

    this was super helpful thank u!!!

    • @CodingWithAdam
      @CodingWithAdam  Před rokem +1

      You’re welcome! Glad the video helped!

    • @secydon
      @secydon Před rokem +1

      @@CodingWithAdam i was just curious about how to change the message from "winner is o!" to what message i want. For example i want to do "humanity has won"

  • @rajivagarwal5875
    @rajivagarwal5875 Před 2 lety +2

    Thanks a lot man you saved me

  • @enksek
    @enksek Před 2 lety +2

    very informative...really liked it...

  • @mm-ii3if
    @mm-ii3if Před rokem +1

    I can't get my strike through line to show when there is a winning combo. Any advice?

    • @CodingWithAdam
      @CodingWithAdam  Před rokem +1

      Sorry to hear that I would take a look at the completed solution linked in the description. I only tested in chrome so it could be a browser specific issue.

  • @ramazanmorina3929
    @ramazanmorina3929 Před 2 lety +1

    how to put the code in chrome

  • @ClutchZenith.
    @ClutchZenith. Před 2 lety +1

    3:42 how did u make them multiple instantly?

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +2

      It’s a neat trick. It’s the duplicate line shortcut in vscode
      Select the line that you want to duplicate.
      If you want to copy the line to the line above itself, press Shift + Alt + Up Arrow Key.
      If you want to copy the line to the line below itself, press Shift + Alt + Down Arrow Key

    • @ClutchZenith.
      @ClutchZenith. Před 2 lety +1

      @@CodingWithAdam thank you so much! you are very underrated.

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +1

      Thank you! 😊

  • @sanyamjain4777
    @sanyamjain4777 Před 2 lety +2

    Hey when same player is on 4,5,6 in which the line doesn't match it still says win its a bug

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +1

      I’m not sure if I understand correctly does it do it in the demo here codingwith-adam.github.io/tic-tac-toe/index.html

  • @user-hh5dp5uq6i
    @user-hh5dp5uq6i Před 2 lety +1

    I am not undrestand

  • @dienasormosquito3259
    @dienasormosquito3259 Před 2 lety +1

    I won't run 🤧🤧🤧🤧

    • @CodingWithAdam
      @CodingWithAdam  Před 2 lety +1

      Sorry to hear that. Have you checked the console for errors in chrome?