1 2 3 4 5 6 7 | const a = { duration : 50 } ; a . duration ?? = 10 ; a . speed ?? = 25 ; console . log ( a . duration ) ; // Expected output: 50 console . log ( a . speed ) ; // Expected output: 25 |
Replacement for:
1 | a . duration = a . duration ?? 10 |