JavaScript empty function code example
Example 1: javascript empty function
const func = () => {};
// Or
const func = Function();
Example 2: empty javascript
'use strict';
delete Object.prototype; // throws a TypeError
Example 3: empty javascript
function sum(a, a, c) { // !!! syntax error
'use strict';
return a + a + c; // wrong if this code ran
}