This document compares quirks between Ruby and JavaScript by providing examples of code snippets and their outputs in each language. Some key differences highlighted include:
- Variable and method definitions behave differently, with Ruby raising errors and JavaScript returning undefined.
- String concatenation and addition rules are not the same, such as adding objects to strings.
- NaN and null/undefined behaviors like type coercion and method calls have inconsistencies.
- Boolean logic and comparisons like == have unexpected outcomes in JavaScript.
- Syntax errors occur in different cases, such as extra braces in Ruby.
- Object comparisons and primitive wrapping give different results between the languages.