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 "difficult"

"To those who have more experience and confidence with JavaScript" I've almost finished my JavaScript foundation and I've got to admit that many of the answers to the challenges and quizzes I cheated as I found it really confusing and a little boring to follow. I plan to go back and review the stuff but I was wondering if anybody could give me some words of hope. :) cause at the moment I feel a little puffed with it.

Hi, I also found that during the video's it just wasn't sinking in. You do need a good knowledge of html and css but i found this book and although it can be a laborious read at times it has given me a infinitely better grasp of what is actually going on with this language. Just to give you an insight take this script off my portfolio page

       $('#contact').click(function(){
        $('form').animate({left: '0px'}, 1000);
        });
        $('#contact-close').click(function(){
        $('form').animate({left: '-400px'}, 500);
    });

So take the first line this is using the $ to call jquery then selecting the element with the id of contact and adding a click handler (listening for a click) to it then declaring a function.

Then the second line which will run when the #contact element is clicked. Again calls jquery with the $ selects the form element and changes the left position to 0px at a speed of 1000 milliseconds.

Then line four is similar to line one but instead of selecting the #contact and adding a click handler it adds one to the #contact-close element.

Then the final line again similar to line 2 except it is reversing the action at a faster speed if 500 milliseconds.

I feel once you get a good grasp of the process it becomes easier to learn the syntax plus google is at your finger tips.

If you want to view it action to get a better perspective its adamsackfield.co.uk (currently not finished but everything is working)

Thanks Adam Learn By Exploration

Thanks Adam for your time. I really appreciate the advice and support that you and other members offer. It is one one the main reasons I chose to pay for the tuition rather than jumping from one site to the other picking up free stuff, even though I must add that there issome great free stuff out there but when it comes to support it tends to be either none existent or too slow it make the learning process enjoyable. Once again thanks for your time!

No problem, I remember what it was like when I was new and having the thirst to learn new stuff but roadblocks seem to appear with a lack of understanding or just need it breaking down more logically for me. People on here helped me and I am paying it forward.

Thanks Adam And good luck to you and your ventures.

Ps. That book you mentioned seems pretty interesting but at the moment cash is real tight and even though the price is ok but it's still out of my range until I get some monies coming in.

Do you have an email address that I can send you some resources?

Yep! Sure do in this day and age :) peterpope57@yahoo.com. All help is most welcome Adam. Thanks!

7 Answers

Hi, I also found that during the video's it just wasn't sinking in. You do need a good knowledge of html and css but i found this book and although it can be a laborious read at times it has given me a infinitely better grasp of what is actually going on with this language. Just to give you an insight take this script off my portfolio page

   $('#contact').click(function(){
    $('form').animate({left: '0px'}, 1000);
    });
    $('#contact-close').click(function(){
    $('form').animate({left: '-400px'}, 500);
     });

So take the first line this is using the $ to call jquery then selecting the element with the id of contact and adding a click handler (listening for a click) to it then declaring a function.

Then the second line which will run when the #contact element is clicked. Again calls jquery with the $ selects the form element and changes the left position to 0px at a speed of 1000 milliseconds.

Then line four is similar to line one but instead of selecting the #contact and adding a click handler it adds one to the #contact-close element.

Then the final line again similar to line 2 except it is reversing the action at a faster speed if 500 milliseconds.

I feel once you get a good grasp of the process it becomes easier to learn the syntax plus google is at your finger tips.

If you want to view it action to get a better perspective its adamsackfield.co.uk (currently not finished but everything is working)

Thanks Adam Learn By Exploration

raymond pope could you choose a best answer to close the question thanks

I think the core thing to remember when it comes to any kind of learning is that it is the returning that matters. Revisiting the information, becoming familiar with it, produces learning and interest. Friendliness towards your learning can remove many of the negative states of mind that may hinder you. For instance, if you find yourself bored it's entirely possible you aren't paying enough attention and you should treat the tutorials and information with what's known as "beginner's mind."

If that's not an option for you, coming back always is. I find that with this kind of learning your functional knowledge is usually three steps behind what you're learning. It seems that learning information that hinges upon foundational learning causes the foundational learning to become solidified as a secondary result to the learning you're currently doing.

Good advice!

Thanks Adam As Adam says, good advice! These are my first messages of the day as position myself in front of my screen and prepare to plunge into it once again with my first coffee on my desk trying hard not to let it get cold. :)

Thanks Stone and Aaron For the kind words of encouragement and advice. Nice to know someone's out their listening.

For me, the best way to learn coding from a video or tutorial is to try to anticipate what the teacher is going to do next, before he/she writes the code on screen. I usually take about 20 minutes to watch a 10 minute video because I have a text editor and browser open to test out everything they do.

Every time the instructor says, "now we're going to do X to add Y and Z", I pause the video, and write my best guess at how to code what they just described. If I can't get it to work the way it should after a few tries, then I watch the next section of the video to see where I went wrong.

I find that it's much easier to master the concepts if you are working along with the teacher in this way. And since Treehouse does a good job of progressing logically through the material, it's not actually hard to do. You can't be eating a burrito and tweeting while you "watch" with half your brain, though; it requires focus and attention. But so does doing anything well. Cheers!

i find Javascript (especially Jquery) syntax very confusing myself. Its pretty hard to read and to follow the logic of the code. The more you write the easier it will get to read and to understand. If you are feeling confused/not confident I would definitely go back and watch the videos again and do everything a second time. That should help quite a bit.

Thanks for your time Stone. Definitely on the agenda to take another look at the videos and comforting to know that I'm not alone with my pains.

If it was easy, everyone would do it :) Programming isn't going to be fun (or easy) much of the time. My recommendation would be to explore other areas of development to see if there is something you enjoy more like PHP or Ruby, or accept the fact that the JS is going to be painful for a while and continue to slog through it. Everything becomes easier with practice!

I should also note that I also found the JS pretty boring, but front end stuff just doesn't interest me as much as other development technologies.

I disagree with it not being fun or this may just be me!

I feel the same way. I'm having a bit of trouble picking up JavaScript/JQuery. I've been trying to find different resources for one that might "click" but no luck so far. I have found I can understand PHP a lot better and enjoy it.

Thanks Tiffany. I agree with you and today I'm still struggling to digest it but I know if I keep with it it will become clear one day. What keeps me going is the examples I've seen what you can do with JavaScript and JQuery.