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

Aurelian Spodarec
Aurelian Spodarec
10,801 Points

Is JS that simple, or?

HI,

SO while I'm new to JS, and while i struggle with it, I know that with practice eventually I will understand it fully, and the documentation.

So far, with the documentation, I came across interesting things.

E.g.

  window.addEventListener("load", function(event) {
    console.log("All resources finished loading!");
  });

So, we can use this 'load' function to make an animation e.g. a circle that loads, or a bar, while the 'heavy' page loads, like we see soemtimes on e-commerce sites right? So now we need to write, show this that will increase a % of the site is loaded.

And then there is another function or method whatever it's called, that will e.g.

if the user is scrolling, then do this.

Etc..

Making a gallery? well, we need to get the lenght of the images, so we select all of the gallery itme, with a query selector and class here, and we count the lenght of it, and if it reaches the last item, then back to one and start again.

It goes along those lines right? I just need to get to know documentation better, and how the syntax works, and Id' be fine right, it might take few weeks tog et used to it, but it's not really that hard if we think about it, is it? I can be calm and be sure I can learn this in a month, the basic fundamentals doing stuff like modlas and so on.

1 Answer

Stan Day
Stan Day
36,802 Points

JS is pretty simple and has a low barrier to entry compared to other languages which is one of the reasons it is the most popular language now. You seem to have the right idea already.

Aurelian Spodarec
Aurelian Spodarec
10,801 Points

I'm not sure, but JS is over ratted that it's 'hard'. Step by step and you can actually understand it.

Yes yes yes.. later one, advanced stuff is probably hard etc.. but in the begining everything is easy.

Too much 'halo' on the internet xD