Skip to content

Commit c0916a3

Browse files
authored
Update data-types.md with correction of example code
The example for handling out of bounds errors in array indexing used >= instead of <= incorrectly in the second example of using || operator. Using >= would result in the error still occurring for array lengths of 0-2.
1 parent 0ef9c74 commit c0916a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/azure-resource-manager/bicep/data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ param emptyArray array = []
8383
param numberArray array = [1, 2, 3]
8484
8585
output foo bool = empty(emptyArray) || emptyArray[0] == 'bar'
86-
output bar bool = length(numberArray) >= 3 || numberArray[3] == 4
86+
output bar bool = length(numberArray) <= 3 || numberArray[3] == 4
8787
```
8888

8989
## Booleans

0 commit comments

Comments
 (0)