Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects Mixing and Matching Arrays and Objects

Ali Sh
Ali Sh
2,026 Points

How to train my coding skills?

After knowing all these codes, functions and loop how to train myself and not forget all the codes i have learned???

2 Answers

Hey Ali! I think the handsdown best way to remember what you learn, is to put it into use - build some projects. You can find plenty of great beginner projects online.

Im assuming that it is Javascript your reffering to. Well why dont you build a dynamic website? Or maybe build a console based hangman game? The first thing i did when i felt i was familiar with Javascript was to build TicTacToe game in the browser. When i got even more familiar with functions and arrays, i added AI to play against.

I definetly recommend you build some realworld application. Happy coding!

Ali Sh
Ali Sh
2,026 Points

Thank you so much for the support, but this is the first time for me to learn how to code or to program so what do you mean by building some projects in realworld and how to start doing it? Also i don't know to much about coding, i only know the basics of JavaScript and some functions, loops and objects and i don't have any knowledge about HTML or any programming skills.

Thank You.

Hey again Ali! What i mean by "real-world" projects, is basicly just to build "something" with your knowleagde. I can tell that you have about 1.000 Javascript points. So presumably you know how to write things to the console, how to add numbers, how to store things in variables, how arrays work etc. Nothing to complex, but with this base knowleagde, you can actually do quite alot of stuff.

My first project was "Guess the number". This is a game in which a random number is sellected by the computer, say between 0 and 100. Then the user has to try to guess that number, so the user inputs a number, if its the number the computer picked, print "You won". If it isnt print "That wasnt my number", and have them guess again.

Hopefully you can build that, if you do manage to do that, you can start making it a bit more interactive by implementing some more fetaures:

  • Make the user have only a limited amount of guesses
  • When the user makes a guess, print wether the guessed number was smaller or bigger than the computers number
  • Ensure that the user cant guess the same number twice
  • If the user does guess the number, print out what the number was, and how many tries it took them
  • Make the user, at the beginning of the game, able to sellect what range of numbers the computer can pick, so from 0 - X.

I think this is a great first project. If your having difficulty along the way, please feel free to write back to this post, and ill be sure to give some feedback.

Note: While id love to help out with anything, if you do find yourself stuck somewhere, say you dont know how to sellect a random number, Google is a great ressource, just try to write something like: Javascript random number generator, and a ton of suggestions will pop up. Happy coding!

Ali Sh
Ali Sh
2,026 Points

Thank You so much for the information and support, i'll start to practice.