js primitive
1 | const PrimitiveType = |
- primitive value are immutable
array fill
1 | const arr1 = new Array(2).fill({}); |
react state
1 | const [state, setState] = useState(0); |
1 | const PrimitiveType = |
1 | const arr1 = new Array(2).fill({}); |
1 | const [state, setState] = useState(0); |