Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit ded04a3

Browse files
committed
minor commit
1 parent 1a1a1b4 commit ded04a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/language/operator-overloading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Fraction {
1818
}
1919
}
2020

21-
console.log(Fraction.add(new Fraction(5, 4), new Fraction(1, 2)).toString()); // 输出 "14/8"
21+
console.log(Fraction.add(new Fraction(5, 4), new Fraction(1, 2)).toString()); // Output: "14/8"
2222
```
2323

2424
In Rust, many operators [can be overloaded via traits][ops.rs]. This is possible because operators are syntactic sugar for method calls. For example, the `+` operator in `a + b` calls the `add` method (see [operator overloading]):

0 commit comments

Comments
 (0)