-
What felt good about your process? I tried a new solution after my first one worked
-
What was difficult/where did you struggle? My new solution performed WORSE than the first one
-
What feedback did you receive?
This gist contains a short assignment I'd like everyone to complete before our formal lesson. The prework involves reading some of the React Router documentation, and will allow us to keep the lesson more hands on.
- Fork this gist
- On your own copy, go through the listed readings and answer associated questions
You will not be turning this in; it's for your own understanding/learning/benefit 😁
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
by David Stavis | |
Please leave feedback. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BoggleBoard | |
def initialize(board) | |
@board = board | |
end | |
# method that maps through each | |
def create_word(*coords) | |
coords.map { |coord| @board[coord.first][coord.last] }.join("") #@board is a 2D array | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def super_fizzbuzz(array) | |
#It should return a "fizzbuzzed" Array, i.e., the array is identical to the input with the following substitutions: | |
array.each do |number| | |
#Multiples of 3 should be replaced with the string "Fizz" | |
#Multiples of 5 should be replaced with the string "Buzz" | |
#Multiples of 15 should be replaced with the string "FizzBuzz" | |
if number % 3 == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a factorial method which takes as its input a non-negative integer and calculates the factorial of that number. | |
The factorial of a number is the product of all integers from 1 up to that number. For example: | |
factorial(5) == 5 * 4 * 3 * 2 * 1 == 120 | |
The factorial of 0 is defined to be 1. | |
------------CODE------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# longest_string is a method that takes an array of strings as its input | |
# and returns the longest string | |
# | |
# +array+ is an array of strings | |
# longest_string(array) should return the longest string in +array+ | |
# | |
# If +array+ is empty the method should return nil | |
def longest_string(array) | |
return nil if array.empty? | |
NewerOlder