This course teaches you how to build a JavaScript-based card game with random card ordering mechanics. By the end of the course, you will be able to create a fully functional game, applying key skills like HTML structure, CSS Grid for layout, JavaScript asynchronous programming with async/await, the Fetch API for data retrieval, and the Fisher-Yates shuffle algorithm for randomization. You'll also gain expertise in DOM manipulation, CSS animations, and adding interactive features such as dynamic card flipping and game logic with counters.



Game Time 2024 – Build a JavaScript Game with Random Order

Instructor: Packt - Course Instructors
Included with
Recommended experience
What you'll learn
Learn how to build a dynamic card game using HTML, CSS, and JavaScript
Master JavaScript concepts like async/await, the Fetch API, and Fisher-Yates shuffle.
Understand how to optimize DOM manipulation using document fragments and efficient event handling.
Gain practical experience with CSS Grid and advanced styling techniques for responsive designs.
Skills you'll gain
Details to know

Add to your LinkedIn profile
May 2025
6 assignments
See how employees at top companies are mastering in-demand skills


Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review

There are 6 modules in this course
In this module, we will kick off the project by setting up the essential HTML structure, diving into the fundamentals of CSS for layout and design, and introducing important styling concepts such as REM vs EM and CSS Grid. You'll also learn how to manage consistent styles with root variables and best practices for a clean, scalable CSS setup.
What's included
6 videos1 reading1 assignment
In this module, we will focus on populating the CSS grid with dynamically loaded cards from a JSON file. You will learn how to reference, retrieve, and process data using async/await, Fetch, and array methods like map() and flatMap(). Additionally, we'll explore efficient DOM manipulation techniques, such as using document fragments, to enhance performance when adding cards to the grid.
What's included
17 videos1 assignment
In this module, we will implement interactivity with dynamic event listeners and use CSS 3D transformations for a smooth flip effect. You'll also learn how to randomize the card order using the Fisher-Yates shuffle algorithm and troubleshoot common array-related issues in JavaScript. Finally, we’ll simplify our code with destructuring assignment and other best practices.
What's included
8 videos1 assignment
In this module, we will add the necessary logic for detecting matched and unmatched cards. You will learn how to use flags to limit user interactions, apply the ternary operator for logic checks, and implement setTimeout() for timed actions. Additionally, we’ll explore how to reset game states and prevent repeated clicks, enhancing the overall gameplay experience.
What's included
7 videos1 assignment
In this module, we will add an exciting visual effect by coding falling stars and implementing a losing image overlay for when the game ends. You'll learn how to use JavaScript and CSS animations to create the falling star effect, and manage game timing with setInterval and clearInterval to control the gameplay. Testing and cleanup of the animation elements will also be covered to ensure smooth performance.
What's included
10 videos1 assignment
In this module, we will wrap up the course by reviewing the concepts and skills you’ve gained in building your JavaScript-based game. We will summarize the techniques used throughout the course and reflect on how to apply them to future projects, ensuring you're ready to take on new challenges in game development.
What's included
1 video1 assignment
Instructor

Offered by
Why people choose Coursera for their career




Career resources
Unlock access to 10,000+ courses with a subscription
Explore roles and skills, learn more effectively with Coursera Coach, and earn recognized credentials
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Join over 3,400 global companies that choose Coursera for Business
Upskill your employees to excel in the digital economy
Frequently asked questions
Yes, you can preview the first video and view the syllabus before you enroll. You must purchase the course to access content not included in the preview.
If you decide to enroll in the course before the session start date, you will have access to all of the lecture videos and readings for the course. You’ll be able to submit assignments once the session starts.
Once you enroll and your session begins, you will have access to all videos and other resources, including reading items and the course discussion forum. You’ll be able to view and submit practice assessments, and complete required graded assignments to earn a grade and a Course Certificate.
More questions
Financial aid available,