Skip to content

Instantly share code, notes, and snippets.

Avatar
😇
Living the JS life

Vladimir de Turckheim vdeturckheim

😇
Living the JS life
View GitHub Profile
View bound-funtion.js
var exec = function() {};
exec.bind(null)();
View try-catch.js
function exec() {
try {} catch (e) {}
}
View try-finally.js
function exec() {
try {} finally {}
}
View try-catch-finally.js
function exec() {
try {} catch (e) {} finally {}
}
View eval.js
function exec() {
eval('var foo = 5;');
}
View yield.js
function* exec() {
yield 0;
}
View phi-use-of-const-or-let-variables.js
function test() {
for (let i = 0; i < 0; i++) {
const x = __lookupGetter__; // `__lookupGetter__` and
}
const self = this; // `this` should both be present for this to happen
}
View phi-use-of-arguments.js
function test1() {
var _arguments = arguments;
if (0 === 0) { // anything evaluating to true, except a number or `true`
_arguments = [0]; // Unsupported phi use of arguments
}
}