Sign in

ES6 has object restructuring to create variables from an object’s properties.

We can create objects with {...} and properties which have key and value pair. Key has '' around it and there is : between key and value. Value can be any type.

I have a hard time understanding and remember these Javascript Objects, Instance Methods, and Functions because I don’t use them daily. So I hope this will help you to refresh your memory.

We use objects to store multiple values as a data structure.

The apply() method calls a function with…

I have built projects after I graduated from Flatiron school. We can build them with JS with or without React, Vue framework. I prefer to do them plain JS, so I can get a better understand of JS. This project updates CSS Variable with JS that I have learned from…

JavaScript Higher-Order functions allow functions that operate on other functions. These methods help to transforming, searching, and summing lists easier. These methods are are map(), filter(), reduce(), find(), forEach().

The map() method creates a new array with the results of calling a provided function on each element in this typed…

Building a todos application by following these order:

1 Create the React app on the terminal. Run the command below and it will create a directory my-app

2 Start up the React app

Change directory to app-frontend and run npm start . …

I graduated from Flatiron school last year. I have been prepared for my job search since then. I had a couple of HR phone interviews, technical interviews. Some companies asked you to take the assessment test prior to the phone interview. Here is an example of an online assessment test…

Is a power of two

Given a positive integer, write a function to find if it is a power of two or not.

Naive solution

In the naive solution, we just keep dividing the number by two unless the number becomes 1 and every time we do so, we check that remainder after division is…

Photo by Shahadat Rahman on Unsplash

I’ve been learning Data Structures and Algorithms since I graduated from Flatiron School. There are a lot of good online resources that you can use. They are online code challenges, videos, books, blogs. However, I start losing track due to overwhelming resources. I try to learn a specific topic at…

Euclidean Algorithm

In mathematics, the Euclidean algorithm, or Euclid’s algorithm, is an efficient method for computing the greatest common divisor (GCD) of two numbers, the largest number that divides both of them without leaving a remainder.

The Euclidean algorithm is based on the principle that the greatest common divisor of…


In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example

We can use for loop:

Huy Do

Full Stack SE. I love to build beautiful web apps and learn new technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store