Skip to content

Commit ced4a24

Browse files
Update en/documentation/ruby-from-other-languages/to-ruby-from-javascript/index.md
this is a good clarification Co-authored-by: Copilot <[email protected]>
1 parent c26114c commit ced4a24

File tree

1 file changed

+1
-2
lines changed
  • en/documentation/ruby-from-other-languages/to-ruby-from-javascript

1 file changed

+1
-2
lines changed

en/documentation/ruby-from-other-languages/to-ruby-from-javascript/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ Unlike JavaScript, in Ruby,...
5959
* Ruby methods can end with `?` (for predicates) or `!` (for
6060
destructive operations).
6161
* Parentheses for method calls are usually optional.
62-
* You use `require` or `require_relative` instead of `import` or
63-
`require()`.
62+
* You use `require` or `require_relative` in Ruby, whereas in JavaScript you use ES6 `import` (or Node.js's `require()`).
6463
* Classes are defined with `class...end` blocks rather than constructor
6564
functions or class expressions.
6665
* Ruby has built-in support for operator overloading.

0 commit comments

Comments
 (0)