- Tic Tac Toe
- Rock Paper Scissors
- memory/matching game
You can easily ratchet up the complexity once you have these working. Tic Tac Toe can be turned into Connect Four, for example. Similarly, you can increase the complexity of a memory/matching game by increasing the board size, or use what you learn there to create a rudimentary game of Go Fish.
There are some more typical types of things to build that feel less playful, of course. Build a to-do app. Or a blog. Or a simple chat/messaging program. Don't over complicate it. Keep it as simple as you can to learn what matters here—CRUD operations with a database, client-server interaction, templating, MVC, and so on.
When I start with a new language, I read a few books about it and this really helps getting some edge cases. But often some concepts feel rather arcane till I tried them. So trying to get some of the default "projects" (for web: hello world, todo-list, blog) working clarifies most things.
The absolute very best way to learn to program is by actually building a real project and trying to ship it. Not some sample thing, not some toy or exercise, the real thing.
Nothing will teach you to program faster than the necessity of implementing something.
Whilst you are building, just read, read, read read. Eventually some lights will start to come on.
You need relentless drive and and total unwillingness to give up.
Programming is really only truly learned by doing.
And the learning experience will be extremely frustrating. It helps if you know what to expect, which I wrote about here: http://fourlightyears.blogspot.com/2015/04/frustration-and-e...
I've had several friends/colleagues go through a coding bootcamp. Make sure to do research and focus on outcomes-focused programs. Seeing you are wanting to learn JavaScript, Couple of the top programs I know are MakerSquare (Austin, SF, LA, and NYC) and Hack Reactor (SF). Your investment will be worth it -- however, only invest if you are serious about a career as a Software Engineer.
It teaches Processing (which is technically Java). It got me into programming again and maybe it will help you too.
It's like asking how one learns to do math.
You look at what technology is out there, and play with it.
Here is one list of common tech: http://programming-motherfucker.com/become.html
Time is better spent in getting the right resources to use given a goal.
I'm learning C++
And then just start building stuff