Whiteboarding problems from The Iron Yard-Austin
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
01_greater-integer.js
02_hello-name.js
03_dice-roll.js
04_month-number.js
05_absolute-value.js
06_smallest-integer.js
07_random-element.js
08_value-in-array.js
09_largest-in-array.js
10_sum-of-array.js
11_number-positive.js
12_ask-input.js
13_has-own-property.js
14_number-of-each-letter.js
15_insert-string.js
README.md

README.md

Whiteboarding Problems

Whiteboarding problems from The Iron Yard-Austin Front End Engineering class

October-November 2015

greater-integer.js

Create a function that, given two integers, returns the greater of the two

hello-name.js

Create a function that takes a name and display "hello" plus that name

  • Display "hello" plus that name if the name begins with "A-L"
  • Display "goodbye" plus that name if the name begins with "M-Z"

dice-roll.js

Create a function "dice" that will return a roll of 2 dice between 1 & 6

month-number.js

Given a month number, return the name of the month

absolute-value.js

Create a function that determines the absolute value of a given number

smallest-integer.js

Create a function that, given three numbers, returns the smallest of the three

random-element.js

Given an array, return one randomly selected element

value-in-array.js

Given an array and a value:

  • Return true if the value exists in the array
  • Return false if it does not exist in the array
  • Do not use indexOf or .find

largest-in-array.js

Given an array of integers, return the largest integer

sum-of-array.js

Given an array of numbers, return the sum of all numbers

number-positive.js

Given an array of numbers, return the number of positive numbers

ask-input.js

Create a function that will ask user a yes or no question.

  • It will continue to ask until their input is "yes" or "y" or "no" or "n"

has-own-property.js

Recreate the method hasOwnProperty

  • Takes an object and string as arguments
  • Return true if the property exists in the object
  • Return false if the property does not exist in the object

number-of-each-letter.js

Create a function that takes a string

  • Return an object with each letter and number of times it occured in the string

insert-string.js

Given two strings, put the second string in the middle of the first string