Clarify documentation of STRING * INTEGER

This commit is contained in:
pkoppstein committed 2015-08-04 21:40:16 -04:00
1 parent b5edbf7ffa
commit d66fbd218b
1 file changed
+4 -3
+4 -3
View File
@@ -612,13 +612,14 @@ sections:
- title: Multiplication, division, modulo - `*`, `/`, and `%` - title: Multiplication, division, modulo - `*`, `/`, and `%`
body: | body: |
These operators only work on numbers, and do the expected. These infix operators behave as expected when given two numbers.
Division by zero raises an error. `x % y` computes x modulo y.
Multiplying a string by a number produces the concatenation of Multiplying a string by a number produces the concatenation of
that string that many times. that string that many times. `"x" * 0` produces **null**.
Dividing a string by another splits the first using the second Dividing a string by another splits the first using the second
as separators. Division by zero raises an error. as separators.
Multiplying two objects will merge them recursively: this works Multiplying two objects will merge them recursively: this works
like addition but if both objects contain a value for the like addition but if both objects contain a value for the