-
-
Save anonymous/d3f9b86a6400f5c6f76f to your computer and use it in GitHub Desktop.
RUBY: Checking for matches between a and b, then appending matches to new array called c is my goal.
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 foo(a, b) | |
c = Array.new; | |
for i in a | |
for j in b | |
if i == j | |
c << "j" | |
return unique(c) | |
error is | |
part4.rb:7: syntax error, unexpected $end, expecting keyword_end | |
return unique(c) | |
^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment