javaScript newbies, I have a challenge for you!

javascript-newbies,-i-have-a-challenge-for-you!

As a beginner or someone learning programming, it can be overwhelming to start working on solo projects. However, like anything complex, it helps to take baby steps.

For example, after you learn something new you could try to figure out a way to apply what you have learned. You do not have to create anything massive or huge. Creating something small but has a clear purpose can be a greateway to get your feet wet.

Okay, but how do I find ideas on what to create?

Every invention starts with an idea, and every idea starts with a question. So every time you learn something new try to ask yourself something like:
“How can I use this to create something with purpose?”
“Do I know of a problem that this can help solve?”

It also helps to try and stop after learning something new, and see how you could use that with the things you have already learned. For example, I wrote an RGB color generator function a while back, I was still in my early coding days. It started with me asking myself “ if the RGB model consists of different values of the colors Red, Blue, and Green. Can I just make a function that relies on the Math.random method to generate different colors, by generating a random integer value of each color component?”

It was at a time, when I felt I knew all the concepts that would allow me to create a function like that, but I still lacked the confidence. However, I pushed myself and I did it, and it was only possible because I broke down the problem into simple TODOs.

Here is your Challenge!

If you are someone who is new to coding and is looking for a challenge to help you slowly breakout of tutorial hell, and start creating your own project. I challenge you to try and create an RGB color generator function. The function, should consist of 5 lines of code. I made a code pen – You’ll find it below complete with all the extra code required, and all you have to do it complete the function.

The concepts you should be familiar with to complete the challenge:

  • Defining a function
  • Declaring variables: We declare a variable to hold the values of – The RGB color format
  • Math.random method

To try the challenge just complete the colorGen function in the JS section:

Spend at least half an hour trying, and after that if you feel completely at loss. You could watch this short tutorial to help you out:

Best of luck!

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
why-does-everyone-fear-java?-is-it-really-the-hardest-programming-language?

Why does everyone fear Java? Is it really the hardest programming language?

Next Post
usando-migrations-com-golang

Usando migrations com Golang

Related Posts