Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //v1
- function closure(value) {
- const getLength = () => value.length;
- return getLength;
- }
- // v2
- function closure(value) {
- const length = value.length;
- const getLength = () => length;
- return getLength;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement