Documentation - Add spaces between array elements coding guidel… (#7524)

This commit is contained in:
jonpas 2020-02-23 02:12:15 +01:00 committed by GitHub
parent 3145a31d00
commit 7069cb82c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -397,6 +397,23 @@ Magic numbers are any of the following:
[Source](http://en.wikipedia.org/wiki/Magic_number_%28programming%29){:target="_blank"}
### 5.7 Spaces between array elements
When using array notation `[]`, always use a space between elements to improve code readability.
Good:
```js
params ["_unit", "_vehicle"];
private _pos = [0, 0, 0];
```
Bad:
```js
params ["_unit","_vehicle"];
private _pos = [0,0,0];
```
## 6. Code Standards