How to Create an Array of Specific Length?
If you want to create an array of a certain length you’ll need to use the Array.from
method. This is how it would look if you wanted to create an array with length of 50:
Array.from({ length: 50 });
The method’s optional second parameter is a map
function. Check more about Array.from
here.
What I’ve Been Doing
The other day, I mentioned that I almost completely binged Wes Bos’ CSS grid course. Well, every morning I have been taking 30 minutes to watch a video or two. I should be done with it in the next couple of days.
Every morning, I’m also taking 30 minutes to solve a HackerRank exercise.
Yesterday, I finished my rock, paper, scissors game project. This one definitely gave me a confidence boost and I really gave my all to make that code as clean as possible.
Next projects lined up are a pomodoro timer, a to-do list (perhaps I get into localStorage
here), and a Tic Tac Toe. I’ve set a deadline to be done with these 3 projects by the end of the month.
I am still debating whether I should get into some Sass, jQuery and Boostrap in the mornings, after I’m done with the grid course, and integrate these with the projects. This one sounds good to me…