// 'use strict'; // โญ toggle sloppy/strict mode
const { log } = console;
// declarations
let x = 3.14; // variable
function f1() { log('f1'); } // function declaration
let f2 = function() { log('f2'); } // function expression
let fruits = ["Banana", "Orange"]; // array
let person = { name: 'John', age: 18 }; // object
// log
[
// mode: // sloppy strict
// -----------------------------------------------------------
delete x, // โ false โ SyntaxError
x, // 3.14
delete f1, // โ false โ SyntaxError
f1, // [Function: f1]
delete f2, // โ false โ SyntaxError
f2, // [Function: f2]
delete fruits[1], // โ
true โ
true
fruits, // ['Banana', <empty>] ['Banana', <empty>]
delete person.age, // โ
true โ
true
person, // { name: 'John' } { name: 'John' }
].forEach(x => console.log(x));
// โ SyntaxError: Delete of an unqualified identifier in strict mode.