arrWithDefault
특정 길이의 기본값으로 배열을 초기화합니다.
Parameters
| 이름 | 타입 | 필수 | 기본값 |
|---|---|---|---|
defaultValue | anydynamicAny | ● | – |
length | numberint | – | 0 |
Returns
any[]
List<dynamic>
list[Any]
Examples
javascript
arrWithDefault('abc', 4); // Returns ['abc', 'abc', 'abc', 'abc']
arrWithDefault(null, 3); // Returns [null, null, null]dart
arrWithDefault('abc', 4); // Returns ['abc', 'abc', 'abc', 'abc']
arrWithDefault(null, 3); // Returns [null, null, null]python
arrWithDefault('abc', 4) # Returns ['abc', 'abc', 'abc', 'abc']
arrWithDefault(None, 3) # Returns [None, None, None]