top | item 13150375

JavaScript: Everything is not what it seems

1 points| chadscira | 9 years ago

    let EVERYTHING = new Proxy({}, {get: (_, k) => k.toString().match('Symbol\.') ? () => 'OR IS IT?' : EVERYTHING});

    console.log(`${EVERYTHING . IS . NOT . WHAT . IT . SEEMS}`);
Yay proxies?

This is supported in Chrome, and Node.

discuss

order

No comments yet.