product = 1 * 2 array = [1, 2, 3, 4, 5] array.map { |a| a + 2 }

There should be no spaces after (, [ or before ], ) these brackets.

['ankur', 'vyas'] sum(a, b)

Also don't use spaces in while providing the range.

Use5..9 over 5 .. 9Use'a'..'z' over 'a' .. 'z'

When using switch case statements use the following indentation.

casewhen input = '+'puts'The operation is addition'when'-'puts'The operation is subtraction'when'*'puts'The operation is multiplication'elseputs'The operation is division'end

Use following indentation if the parameters exceeds to more than one line.

defsend_mail(source) Mailer.deliver(…

## Comments

## Post a Comment