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
1. Can you execute Ruby in the Chrome console? Why / why not? | |
Ruby cannot be executed in the chrome console. I am not exectly sure the technical reasons, but I would guess is that chrome does not have an inheret Ruby envirement to execute the code. This is why we had to create the envirement on our local computers. | |
2. Write some Ruby code that includes a method that fails to work solely because of a scope issue. Think about how Ruby scope differs from Javascript scope. | |
array = [1,2] | |
def add | |
array[0]+array[1] |