2

Curious JavaScript Challenges for Developers of All Levels

 2 years ago
source link: https://javascript.plainenglish.io/curious-javascript-challenges-for-developers-of-all-levels-ddcb066c8c9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Curious JavaScript Challenges for Developers of All Levels

Write music, draw 3D objects, and even create your own virus.

Iconscout, edited by author

JavaScript can be confusing and downright weird at times, but there is so much you can do with it. Developers who learn JavaScript usually limit themselves to coding challenges and classic web projects such as a portfolio website or an online store. But why stop there?

Forget about boring exercises for a moment and turn on your imagination. There is so much you can code with JavaScript. Let’s have some fun!

101 Hello Words

“Hello World” programs are not only for beginners. See how creative you are and try to come up with at least a few other ways to create a JavaScript program that outputs that famous phrase to the screen. If you don’t see your solution in this GitHub repo, go ahead and share it with others!

Create 3D Objects

You don’t need much to get started with 3D rendering in JavaScript — some basic understanding of JavaScript along with a Three.js library will be enough. All beginners start by drawing a 3D cube or sphere, but then it’s possible to create some truly amazing things. Three.js is also the library frequently used in VR and AR so who knows where this coding project will take you.

Space Invaders

The Coding Train channel on YouTube is a real beast when it comes to unusual JavaScript challenges and projects. If you are a somewhat experienced developer, I would recommend coming up with your own version of this game and then compare the result. Beginners, on the other hand, can follow this great tutorial to learn quite a few things about JavaScript and basics of game development:

Need more inspiration? Back in the day, I also created my version of this game using C++. It was so basic that I called it “Sad Space Invaders”. Nevertheless, it worked!

30 Days of Vanilla JavaScript

Have you heard of JavaScript fatigue? It refers to the inability to keep up with the latest tools and trends because, well, JavaScript changes and evolves almost daily. If you, like all of us, are tired of countless packages and libraries, check out this Vanilla JavaScript course with daily challenges. It’s so refreshing.

The starter files and completed solutions for the course can be found here.

The Snake Game

According to this guy, it’s entirely possible to create the JavaScript version of The Snake Game in 15 minutes. Join the challenge!

By the way, he has an entire YouTube playlist devoted to fun coding challenges like this one.

A Fractal Tree

1*kBtPabXPb6VmXGjLM4KXbA.png?q=20
curious-javascript-challenges-for-developers-of-all-levels-ddcb066c8c9

Is it just me or there is something absolutely magical about fractals? Just look at these trees above created using the p5.js library. Here is a general overview of fractals and fractal trees, in particular, to get you started; if you need some extra help, check out this tutorial.

The Mandelbrot Set

1*bGkHywd5JNxVbCO8h-vOhg.png?q=20
curious-javascript-challenges-for-developers-of-all-levels-ddcb066c8c9

While we are still on the topic of fractals, here is my second favorite — The Mandelbrot Set (my third favorite is The Julia Set in case you are wondering). Try researching fractals and implementing your own version first; if something is not working, there are a lot of helpful tutorials out there:

Conway’s Game of Life

In 1970 the mathematician John Conway invented The Game of Life. It’s not really a game but a fascinating mathematical simulation that can be fairly easily implemented in any programming language (including JavaScript).

Bruteforce Hacking Simulator

This is more of a front-end challenge, but it has its fair share of curious little problems to solve.

Quine

Writing a quine, a self-replicating program which when executed prints the program itself, might sound like a simple exercise at first. However, you can make it way more complicated if you want to. Try to write it on your own first before checking the solutions of others!

Natural Simulations

Khan Academy has a whole unit of their free programming course devoted to Advanced JS and Natural Simulations. Watch their videos first and then complete the challenges. If you are a beginner, you might need to view a few of the previous units as well or the entire course to get up to speed.

Music with Tone.js

Combine music production and JavaScript programming in one fun project. Creating music has a lot more in common with programming than one might think; moreover, the Tone.js library is pretty straightforward and not that hard to work with.

An AI with TensorFlow.js

JavaScript is not the first language that comes to mind when talking about ML and AI. However, it’s still possible to create something really cool using the TensorFlow.js library.

Physics Simulation

There is both an online and PDF version of this tutorial so choose the one you like the most.

Virus

And finally, here is an ultimate challenge — create a JavaScript virus. Of course, it won’t be a really dangerous one, but rather something mischievous and fun. But still, I bet it will be an exciting project to tackle.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK