DEV Community

Cover image for Build Candy Crush in vanilla JavaScript!
Ania Kubow
Ania Kubow

Posted on

6

Build Candy Crush in vanilla JavaScript!

In this walkthrough, I show you how to build Candy Crush in pure JavaScript, HTML, and CSS.

This walkthrough is great as it will show you how to drag and drop elements in JavaScript. This is a very popular element in building many JavaScript projects.

In addition to this, we will also be practising using inbuilt methods such as:

  • addEventListener()
  • setAttribute()
  • setInterval()
  • some()
  • every()
  • forEach()
  • includes()
  • contains()
  • add()
  • remove()
  • createElement()
  • appendChild()
  • push()
  • continue

And many more.

I would love to see your finished game to please do tag me on YouTube, Twitter (@ania_kubow) or Instagram (@aniakubow) :)

I made the background myself, so if you want to use it go for it! I don't mind :) You will find it in the link below.

For images or my final code, please see my GitHub here: https://github.com/kubowania/candy-crush

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (1)

Collapse
 
thisdotmedia_staff profile image
This Dot Media

So fun! Thanks for the tutorial Ania

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay