المعرفة:: JavaScript
الحالة::مؤرشفة
المراجع:: The Complete JavaScript Course 2022 From Zero to Expert
- Introduced in ES2021.
- OR assignment operator (
||=
): assigns a variable to a variable if that variable is currently falsy.
- Nullish assignment operator (
??=
): assigns a variable to a variable if that variable is currently null.
- AND assignment operator (
&&=
): assigns a variable to a variable if that variable is currently truthy.