Follow

Fun bug with "default parameters".

`null` values are considered "defined" so they won't be replaced with defaults unlike values set to `undefined`.

```
function example({something='default'}) { return something }

example({}) === 'default'
example({something: undefined}) === 'default'
example({something: null}) === null
```

· · Web · 0 · 1 · 1
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.