SHARE
TWEET

Untitled

a guest Jun 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let x = {};
  2. x.str = 'Hello Wornld';
  3. x.a = /s/g;
  4. x.action = new Function(x.str, x.a, 'return ' + x.str + '.replace(' + x.a + ', "")');
  5. console.log(x.action);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top