Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
The "Brain Gym" for JavaScript Developers
Rating: 4.8 out of 5(3 ratings)
30 students

The "Brain Gym" for JavaScript Developers

Release the handbrake, learn the missing JavaScript skills that have been bolding you back
Created byOnlyKiosk Tech
Last updated 4/2022
English

What you'll learn

  • Improve your logic reasoning
  • Become a better programmer
  • Learn how to "get around obstacles imposed by solutions"
  • Become more confident and capable of solving problems brought by real-life projects
  • Master 8 different sorting algorithms

Course content

2 sections36 lectures2h 10m total length
  • Making Swaps Without Creating a Third Variable3:14

    In real-world projects, if you need to swap two variables, nobody stops you from creating a third variable. We write a statement from left to right. But a statement is executed from right to left. The same variable can have different values if it shows up on both sides of the assignment operator. We can take advantage of these two features.

  • "Returning" the "IF"5:32

    Usually, we make a decision using the IF statement and then return a conclusion. Why not just directly return the expression we put in the IF statement. The expression will be executed first and its value will be returned. This way, we can save an IF statement, making our program more concise and easier to maintain.

  • Adding a Temporary Property3:38

    Program efficiency is always important. Iterating over an array is a rather expensive operation. You should avoid unnecessary iterations.

  • "Distilling" an Array5:46

    The Array.reduce() method is the most versatile method for working with arrays, especially when you need to draw a "conclusion" by analyzing all elements. This method offers us the perfect opportunity to develop our creativity as a programmer.

  • Removing Duplicated Elements4:43

    By iterating over an array and examine every element, we can deduplicate a given array. Can you fit the deduplicating program into the frame of the Array.reduce() method?

  • Finding the Biggest Element and Collecting Multiple Matches3:34

    Let's say we want to find the items with the highest price and collect them in an array. The challenge is there may be multiple matches. So the solution is to find the highest price value first. Then we select elements with that value.

  • Challenge: Finding The Max Value and Elements with the Max Value Together4:03

    We want to find the highest price and items with the highest price at the same time, within one loop. Can this be done? Most importantly, can this be done using only one Array.reduce() method? 

  • Calculating the Frequency of Each Element4:06

    We still have an array with duplicated elements. We want to know the number of occurrences of each element. Then we want to find the most frequent elements and the max number of occurrences.

  • The "Impossible" Task5:02

    We want to know the number of occurrences of the most frequent elements, and we also want to collect all the most frequent elements. So we want to find these two pieces of information. Can we do this using only one Array.reduce()?

  • The "Hidden IF"2:58

    Group objects by a property with a single reduce, turning an array into an object of arrays based on rating, while handling missing ratings (undefined) and validating input.

Requirements

  • Basic JavaScript knowledge
  • No experience with data structures or algorithms needed

Description

This course helps you become "programming smart." It offers training in logic reasoning, enabling you to come up with better solutions for real-world projects. 

The length of this course is a little bit longer than two hours. But these two hours are challenging and really push your limits.

Every programmer needs to take a leap--from learning the syntax of a programming language or framework to solving real-world problems using what you have learned.

For example, a WHILE or FOR loop is very easy to learn. But nesting two loops together and adding an IF statement, you got yourself a bubble sorting algorithm. From there, you can make further improvements, turning the bubble sorting into the much more efficient cocktail sorting.

This leap is vital but not easy to take. It calls for creativity, which can be trained. This is also the goal of this lesson, helping and forcing you to take the vital leap.

In the first section, we will show you a couple of creative techniques that can significantly improve your code quality, giving you a new perspective of code design.

Very often, the solution also imposes obstacles. The solution for problem A is often incompatible with that of problem B. This requires you to be flexible, finding ways to get around obstacles.

The second section covers eight carefully picked sorting algorithms. 

Sorting algorithms are the barbell for your brain. Honestly speaking, you probably never need to write a sorting program in your real-world projects. Basically, every language has built-in methods dedicated to sorting array elements. But it is the process, not the result, that matters. The process of creating a sorting program forces you to exercise your brain and enhance your logical reasoning. You won't see the benefit right away, but in the long term, you will benefit immensely from it.

Who this course is for:

  • JavaScript developers who want improve their abilities in solving real-world problems.