Whiteboarding problems from The Iron Yard-Austin Front End Engineering class
Create a function that, given two integers, returns the greater of the two
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"
Create a function "dice" that will return a roll of 2 dice between 1 & 6
Given a month number, return the name of the month
Create a function that determines the absolute value of a given number
Create a function that, given three numbers, returns the smallest of the three
Given an array, return one randomly selected element
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
Given an array of integers, return the largest integer
Given an array of numbers, return the sum of all numbers
Given an array of numbers, return the number of positive numbers
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"
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
Create a function that takes a string
- Return an object with each letter and number of times it occured in the string
Given two strings, put the second string in the middle of the first string