DEV Community

Cover image for Yoshi Pixel Art - Generated w/ JS
Jake
Jake

Posted on

Yoshi Pixel Art - Generated w/ JS

I used JavaScript to create a Yoshi pixel art (best viewed in browser). You can change the color of Yoshi, add a grid to it, view the numbers of each created div, and scale the image up and down.

The way I did it was I used a for loop to generate 900 divs in a grid (30x30). Then I created arrays with the corresponding number (references i in the loop) which colors the div based on the number found in the array.

I was really excited to create this, as it really helped me continue develop my skills in JavaScript.

Top comments (0)

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