You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/versions/v3/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Textwire operates similarly to Go when it comes to mathematical expressions. You
71
71
- Logical OR: `||` (`a || b`)
72
72
73
73
:::warning Type Mismatching
74
-
Type mismatching is not supported when performing mathematical operations. For example, you cannot add an integer to a float directly. Type conversion is required to match types using conversion functions such as `<your float>.int()`, `<your int>.float()`, etc.
74
+
Type mismatching is not supported when performing mathematical operations. For example, you cannot add an integer to a float directly. Type conversion is required to match types using conversion functions such as `{{ 3 * 2.3.int() }}`, `{{ 3.3 + 2.float() }}`, etc.
-**Any type for equality operators.** Unlike Go, in Textwire, operators `==`, `!=`, `&&` and `||` can be used with any types on left and right.
114
+
-**Compare arrays and objects.** Use `==` and `!=` to deeply compare arrays and objects. Example: <codev-pre>{{ [1, 2] == [1, 2] }}</code> will result in `true` because both arrays have the same elements in the same order. Similarly, <codev-pre>{{ { name: "Chiori" } == { name: "Chiori" } }}</code> will also result in `true` because both objects have the same key-value pairs. It works for deeply nested arrays and objects as well.
0 commit comments