Ruby On Rails Interview Questions and Answers
Ques. What is a lambda?Ans. Lambdas are very similar to procs in terms of functionality. However, they have a few key differences. Lambdas check the number of arguments passed and will return an error if you try to pass the wrong number (while procs set extra variables to nil). The other difference is that lambdas can handle a return function, whereas procs will return an error.
Is it helpful? Yes No
Most helpful rated by users: