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

ben pines
ben pines
8,389 Points

regarding Practice

I have learned some Javascript lessons through Treehouse, and now I want to practice.

I have various wordpress sites which I can practice on.

my questions are:

  1. What's the best way to practice what I've learned in Javascript and Jquery - build a wordpress plugin, build a site from scratch?

  2. Do you have any practice recommendations?

3 Answers

Jeff Lemay
Jeff Lemay
14,268 Points

Try adding a few little pieces of functionality to your pages.

  • Make an FAQ section where the answer is only revealed when the user clicks the question
  • Create your own lightbox/popup (like when a user clicks a thumbnail they are shown the large version in a lightbox)
  • Add a countdown to some event

Hey Ben,

A neat way I like to practice is just by using the web console on already existing sites. The console is a fun and powerful tool for web development. For example, here's a little piece of code that you can paste into your console for any site that will add a black border to every single element on the page so that you can see the spatial regions of the elements and how much space they actually take up:

var el = document.getElementsByTagName('*');
for (var i = 0; i < el.length; i += 1) {
  el[i].style.border = "1px solid black";
}

Another helpful tool to learn JavaScript is to output pieces of your code to the console to see what they do and what their values are at certain stages. One example of doing that is when I was logging the value of the this keyword and getting a handle on how that keyword works. It can be a fairly tricky keyword, but once you realize what it does at certain points, it's a great keyword to utilize.

And start on your own JavaScript project. You can get some ideas for some projects here on Treehouse and you can check out my project page if you'd like: http://www.marcusparsons.com/projects/index.html

ben pines
ben pines
8,389 Points

Thanks both answers are great!

You can give it to Jeff :) But do play around with the console because it's actually really fun haha