// Before
let name = '';
if (!name) {
name = 'name';
}
// After
let name = '';
name =|| 'name';
// Before
let result;
if (variable !== null && variable !== undefined) {
result = variable;
} else {
result = 'Default';
}
// After
const result = variable ?? 'Default';
// Before
const numbers = [1,2,3,3];
const uniqueNumbers = Array.from(new Set(numbers));
// After
const numbers = [1,2,3,3];
const uniqueNumbers = [...new Set(numbers)];
// Before
let isActive = true;
isActive = !Active;
// After
let isActive = true;
isActive ^= isActive;