Question 2
Write a script that takes in a dividend and a divisor. With those, alert either the quotient by itself OR the quotient and the remainder if applicable. Question 3
Write a function that takes in a number an integer and divides it in half until it becomes 1 or less. Question 4
Write a function that takes in array a and returns a new array consisting of the first n elements of the original array. If n is greater than a, then simply return a copy of array a. Question 5
Write a function that takes in two arrays, a and b, and returns whether or not the listed elements are equal. Assume that all values are primitive (and not Objects) and that the values must be in the same order. It should also output false if the parameters are not arrays. Loops
|
Question 6
Write a function which takes in a String and capitalizes the middle letter of the string. If the string is even, then capitalize the character to the right of the middle. Question 7
Write a function which takes in a word and returns an array containing successive suffixes of the word, starting with the last character. Question 8
Write an Object constructor or Class of a human being. It would also be helpful to draw the Object diagram of a few of these. Presedence |
Cheatography
https://cheatography.com
Javascript Cheat Sheet (DRAFT) by greenpanda
This is a draft cheat sheet. It is a work in progress and is not finished yet.