My latest book "Backend Developer in 30 Days" is out! You can get it at Amazon
← Back to all posts

Pedro's Tech Blog

Pedro Marquez

Written by Pedro Marquez who lives and works in Austin, Texas, doing all things front-end (and some back-end too).

Tag: Array.fill

Hero image for the post

Weird behavior for matrix created with Array.fill()

July 04, 2019

I tried to initialize a two-dimension array with Array.fill() and now weird stuff is happening when I use it. Why??