Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function go(options) {
- let {speed = 4,
- enable: {hyperdrive = false,
- frobnifier = true}} = options;
- console.log("speed=", speed,
- "hyperdrive:", hyperdrive,
- "frobnifier:", frobnifier);
- }
- go({speed: 5});
- var callbacks = [];
- for (var i = 0; i < 10; i++) {
- callbacks.push(function() { console.log(i) })
- }
- callbacks[2]();
Add Comment
Please, Sign In to add comment