Skip to content

Instantly share code, notes, and snippets.

@jdmg94
jdmg94 / Rainforest Test
Created November 15, 2022 17:57
Technical Test from Rainforest
const url = require("url");
// first draft solution
const solveFirstTry = async () => {
const baseURL = "https://www.letsrevolutionizetesting.com/challenge.json";
let id = null;
let isThisTheEnd = false;
do {
# Author: Jose Munoz
#install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install CLI tools
brew install jq git zsh
# install and setup node/npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
@jdmg94
jdmg94 / citrusbyte.test.js
Created January 29, 2019 23:06
A Technical test from CitrusByte
const flattenArray = (initialArray, depth = (1/0), result = []) => {
if(initialArray == null){
return result;
}
for(const item of initialArray){
if(depth > 1 && Array.isArray(item)){
flattenArray(item, depth - 1, result);
} else {
result.push(item);