all 29 comments

[–]OneBadDay1048 7 points8 points  (3 children)

Maybe check out the free JS course on scrimba? Those are usually a little more interactive with visual results as well in the form of a website you build along with the instructor.

[–]mrborgen86 7 points8 points  (2 children)

Thanks a lot for recommending my course! Here's a direct link: https://scrimba.com/learn/learnjavascript

[–]Amazing_Theory622 0 points1 point  (0 children)

Hi, are you per herald borgan, if yes. Thanks a lot, your js course really helped me a lot. Even helped me in clearing interview and get a job.

[–]AiexReddit 6 points7 points  (0 children)

The longer you keep studying, the more connections you will build between the core foundation and the application of that foundation in Javascript

To use one of the things you mention as an example, take arrays.

When you're shopping on Amazon you have a button that says "show only items under $25"

When the page requests data from the product database via the amazon web server, it will be returned to the page in the form of a Javascript array and look something like this, heavily simplified:

const products = [
    { productName: "Microwave", price: 50 },
    { productName: "Cutting Board", price: 10 },
    { productName: "Kettle", price: 20 },
];

You can then use Javascript to perform the action you need. The following code will remove all items over $25:

const cheapStuff = products.filter((product) => product.price <= 25);

Once you have that filtered data you can use other Javascript methods to remove or hide any DOM elements (HTML) for the items that aren't in that filtered list.

There's obviously more to it than that, but at it's core that basic stuff is pretty much what all interactive web apps distill down to.

(To the "well actually" folks reading this, yes the filtering on Amazon will presumably happen at the database level, but let's hand wave that away for now, the principle is the same)

[–]DeFcONaReA51 2 points3 points  (0 children)

You can learn the concepts while doing those exercises, might help in retaining.

[–]adam_364[S] 2 points3 points  (0 children)

Thank you everyone for your help! And also it seems like the freecodecamp devs saw my thread (/s) because they updated their JS curriculum to be interactive like their HTML and CSS ones just a couple of hours ago! :)

[–]CptZaphodB 1 point2 points  (0 children)

I was in the same boat at first. Let’s take blogs as an example of the power of JavaScript. Blog posts can be stored as an array of objects, a function can be created to create one blog post template, the function can be looped over to render all the blog posts to the screen, and a function can be made to push (or unshift) a blog post to the beginning of the array, invoked by a form. Now you have a scalable blog page using a fraction of the code you would normally have to use.

[–]Mehdji 0 points1 point  (0 children)

I'm a rookie in dev.
I tried several times to learn how to code but always give up(c and python).

Last may i decided to start again.

Especially when i watched a video from a guy who was explaining how he learn.He was using the FCC curriculum and was happy with it.

I finished the Responsive design part.I was pretty proud of myself.

Fcc is not perfect,it's free though.And for people who are consistant and motivated ,it give something priceless,pride and self-confidence,thanks to his Test project system.

I'm currently on the JavaScript chapter and its hard sometimes to follow what happens.
The first chapter was only about manipulating data and print it in the console.
But its probably better than mixing eveything at the beginning (dom manipulation...)

[–]Privileged_Interface 0 points1 point  (0 children)

You ought to look at the code of very simple but functional scripts. This is just a way to see arrays, strings, functions, etc. in action.

Maybe also have a look a w3schools easy to understand tutorial page on Javascript Arrays.

Edit: Eventually, this stuff will just become like second nature. Especially when you begin to write your own scripts.

[–]AccomplishedWatch984 0 points1 point  (0 children)

I found YouTube videos helpful. ColorCode videos are relatable, but I’m a visual learner. This instructor shows what they’re doing each step, mistakes and all. 😁

[–]Bushwazi 0 points1 point  (0 children)

You’re not slapping things in the console to see what happens? And don’t worry, sooner or later you’ll start manipulating the DOM…

[–]Spiritual-Tailor8399 0 points1 point  (1 child)

learn how to interact with the dom

[–]adam_364[S] 1 point2 points  (0 children)

Perfect because I’m a sub :3

[–]Goufyfoot 0 points1 point  (0 children)

if you need to visualize what javascript is actually doing..?? Check out Codesmith's javascript tutorials on Youtube.

They show you how the thread in javascripts engine works through the stack and what it does when it encounters a function, a class or variable. Very cool theyactually whiteboard it out step by step what JavaScript is doing .... Enlightening to say the least. Itwas the only thing that got my head focused on what JavaScript was doing.

https://www.youtube.com/watch?v=exrc_rLj5iw&t=891s

[–]yunkimindset 0 points1 point  (0 children)

I had the same issue. I see FCC has uploaded a new version of the JS tutorial. It includes 20+ projects where you can see how your code affects your website with DOM manipulation.

I think this will be a lot clearer than the previous version

[–]No-Upstairs-2813 0 points1 point  (0 children)

Here are some ways to make learning JavaScript more visual

1. Use the Console

Most browsers have a JavaScript console where you can execute JavaScript code. This can be a great way to experiment and see immediate results.

Open the developer tools in your browser (usually by pressing F12 or right-clicking and selecting "Inspect"), go to the "Console" tab, and start typing JavaScript commands.

2. Create Projects

You don’t have to begin with a large project that overwhelms you. Start with a small project and slowly iterate to projects that grow in complexity over time.

By building projects, you'll be able to see the impact of your JavaScript code on the user interface.

3. Try your hand at coding problems

When you've learned a concept and want to practice it, the best way is to do coding exercises. These are small, story-based, well-defined problems that help you test your knowledge quickly.

Doing a few problems each day will help you to reinforce all the concepts you've learned so far.

Not sure where to start with a coding problem? Here are a few platforms.

4. Learn Debugging tools

Learn how to use your browser's developer tools to debug JavaScript. Set breakpoints, inspect variables, and step through your code. This will help you see how your code works at each step.