## Notes on Jest, JavaScript Testing

Jest is from Facebook, it comes pre-installed in Create React App. It’s a good idea to install Jest globally since I will be using it from now on. Or install as a dev dependency: Run it with npm test by adding jest –watchAll in the package.json file. 3 ways to add test files: Put all …

## Notes on Algorithms 3, Insertion Sort

Insertion Sort is yet another way to sort a list in ascending order just like we did with Selection Sort last week. Similar to selection sort, it will keep comparing the current value with other items and place it when it finds a suitable position. Given an array of unsorted integers, it will divide the …

## Notes on Algorithms 2, Selection Sort

Last time I practiced the binary search algorithm and then implemented it on JavaScript. This time I learned about Selection Sort. A selection sort is a sorting algorithm that will take an array of numbers (or strings) and then sort them into ascending order. If I give an input of [1, 5, 3, 4, 2] …

## Binary Search Algorithm in JavaScript

Binary Search algorithm cuts the list in half to find the given item. Here I will be implementing binary search algorithm in JavaScript. Pseudo code: Create a variable min, set it to 0 Create a variable max, set it to array length – 1 Create a variable guess While min is less than or equal …

## Notes on Algorithms 1, Binary Search

Algorithms are recipes to come up with a solution. Large algorithms are actually a collection of lots of smaller algorithms. When it comes to working with lots of data, making an efficient algorithm becomes important. The study of algorithms is needed to build big systems. This could result in the saving of computer time which …

## React Redux Notes

Redux is not just for React, it’s a store system available for other frameworks like Angular, Jquery, Ember or vanilla JS. redux is the main package and react-redux is a supporting package for binding with react. Installation Store Create a store.js file to store all the state items in it. I did it on src/redux/store.js …