Skip to content

Instantly share code, notes, and snippets.

View supertrens's full-sized avatar
🎯
Level Up

Ernst Pierre supertrens

🎯
Level Up
View GitHub Profile
@supertrens
supertrens / note.txt
Created November 26, 2018 18:10
FreightHub Coding Challenge
1) I had first implemented the requirement with both classes in the same file. however, when I split them into dedifferent modules,
I had some issue running it on browser since both `commonJS` and `amd` could import/define to bundle the module.
So, I have mae some google search and I came across `systemJs` module loader, that fixed my issue in browser.
2) About the following requirement `Also make sure that the executions of updateShipment with the same id never run concurrently`.
I wasn't to share if the requirement was to pause the execution of the function and wait until the promise is returned ( I implemented that with async await).
Or it was a request to check the `id value` of the coming update (which I dont implement).
Should you have any technical questions about my submittion, please let me know.
/*===================================== OVERVIEW ================================
* This Function will recieve to arrays as parameters
* and return a boolean.
*
* ==================================== PARAMS ==================================
* arraySet --> 1st parameter that contains an array of elemnts
* arraySubset --> 2nd parameter that contains the array that we are going
* to check if it is inside of the array from param1 or not.
*
*
@supertrens
supertrens / 0_reuse_code.js
Created April 18, 2017 07:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console