Ruby n, 1 = gets.split.map &:to_i -


this question has answer here:

i looking @ ruby code. unsure happening on line:

n,1 = gets.split.map &:to_i 

i understand input array of strings being mapped array of integers why being assigned n,1?

that line of code doesn't anything, it's syntaxerror. can't assign 1, that's not legal name local variable.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -