Skip to content

Instantly share code, notes, and snippets.

function where(arr, num) {
// Find my place in this sorted array.
for (var i = 0;i<arr.length;i++){
if (arr[i]<num && arr[i+1]>num){
var n = i+1
}
return n
}
function where(arr, num) {
// Find my place in this sorted array.
for (var i = 0;i<arr.length;i++){
if (arr[i]<num && arr[i+1]>num){
var n = i+1
}
console.log(n)
}
function where(arr, num) {
// Find my place in this sorted array.
for (var i = 0;i<arr.length;i++){
if (arr[i]<num && arr[i+1]>num){
var n = i+1
return n
}else if(arr[i]==num){
return i
}
function sumAll(arr) {
arr = arr.sort()
var sum = 0
for (var i = arr[0];i<=arr[1];i++){
sum += i
}
return sum
}
function replace(str, before, after) {
var arr = str.split("")
var newArr = []
for(i=0;i<arr.length;i++){
if (arr[i]!=before){
newArr.push(arr[i])
}else{
newArr.push(after)
}
function replace(str, before, after) {
var arr = str.split(" ")
var newArr = []
for(i=0;i<arr.length;i++){
if (arr[i]==before){
if(before.charAt(0).toUpperCase()){
after.split("")[0]=after.charAt(0).toUpperCase()
newArr.push(after)
function translate(str) {
var arr = str.split("")
var firLetter = arr[0]
var secLetter = arr[1]
var vowels = ["a","e","i","o","u"]
for(i=0;i<vowels.length;i++){
if(firLetter==vowels[i]){
var newSt1 = arr.join("")+"way"
return newSt1
}
function spinalCase(str) {
str = str.replace(/[\s_]/g,"-")
str = str.toLowerCase()
return str;
}
spinalCase('This Is Spinal Tap');
@alan2207
alan2207 / interviewQuestions.md
Created April 25, 2017 10:46
Junior Full-Stack Job Interview

Junior Full-Stack Developer

This is a compilation of questions that we have stumbled upon in our job interviews. None of the questions are generic or borrowed from internet, they are real questions. Me and the other authors (@rudiaj, manny) have decided not to log company names, as that would spoil the idea of the interview itself.

Question type

The questions come from multiple interviews for Full-Stack, Front-End and Back-End positions. All interviews were Junior Level. Most of the questions (level 1) deal with pretty basic stuff and serve a functional purpose of eliminating candidates that do not have a certain level of overall and precise knowledge. A smaller amount of questions are harder (level 2), and they are usually meant to test the way you solve problems. These questions are more important in the eyes of the employer, and this part of the test is often performed live or over a video call. These level 2 questions are almost always in the form of a programming task. The idea being that you are

@alan2207
alan2207 / introrx.md
Created July 4, 2017 07:42 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing