List.default
default($value) -> self
Description
Set a default value for missing items.
$nums = [10, 20, 30].default(0) $nums[1] //= 10 $nums[9] //= 0 (default)
Set a default value for missing items.
$nums = [10, 20, 30].default(0) $nums[1] //= 10 $nums[9] //= 0 (default)