The problem we’re solving

Breaking this down you’ll see that you’ll start out being given an array of employees and an employee ID in your function as testcases.

In the array, each employee will have an ID, an importance value, and the subordinates that report to them. What we’re looking for is the total…

function isValidSudoku(board) {
let store = {
rows: {},
cols: {},
square: {},
for (let i = 0; i < 9; i++) {
for (let j = 0; j < 9; j++) {…

Whenever I build a quick frontend prototype in JavaScript, I tend to run a dummy database response for the backend. Recently, I deployed one of these prototypes to Heroku and realized that you cannot run the dummy database in Heroku’s console. To get around this you’d either host another Heroku…

In a previous blog, I had written about how to animate RGB shift using PixiJs’s filters feature. Today I will be going through how to set up a Pixi app from scratch to animate these features in React.

Start with installing it through your preferred package manager.

npm install pixi-filters

PixiJS is a rendering library that will allow you to create rich, interactive graphics, cross platform applications, and games without having to dive into the WebGL API or deal with browser and device compatibility. As a framework, PixiJS is a fantastic tool for authoring interactive content.

Pixi.js is a large…

Sets are a new object type with ES6 (ES2015) that allow creating collections of unique values. The values in a set can be either simple primitives like strings or integers as well as more complex object types like object literals or arrays.

Sets in JavaScript are similar to arrays, but…

Scalable Vector Graphics is an XML-based vector image format for 2d graphics. It is a lossless format for images meaning that image quality never deteriorates. This is achieved by the fact that they’re technically not images in their final form. …

MDN Reference: Fetchapi

// Setup the fetch request with the API's url, 
fetch('<>', {
method: 'POST', // May also be a GET, PUT, PATCH, etc.
headers: {
'Content-Type': 'application/json',
body: JSON.stringify(data), // Data you need to send to your server
// Response from the server - likely won't…

Re-basing is a complex tool in GitHub that allows you to change your commit history. Why would you need to rewrite your GitHub history’s commits and commit times? How would you do it?

Often times in coding, you will frequently make commits to save your progress. You end up committing…

In Ruby, there is an enumerable called inject. It also goes by the name of reduce in Javascript. Ruby enumerable documentation (API dock), #inject is defined as such:

“Combines all elements of enum by applying a binary operation, specified by a block or a symbol that names a method or…

Kevin Xie

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