Skip to content

Instantly share code, notes, and snippets.

@mrpollo
Created May 3, 2012 01:46
Show Gist options
  • Select an option

  • Save mrpollo/2582475 to your computer and use it in GitHub Desktop.

Select an option

Save mrpollo/2582475 to your computer and use it in GitHub Desktop.
var pxy = Proxy.create({get: function(receiver, name){
return name.split("").reverse().join("");
}});
verify(pxy);
@wuman

wuman commented May 3, 2012

Copy link
Copy Markdown

Here is an easier reverse() function:

function reverse(st) {
return st.split("").reverse().join("");
}

@mrpollo

mrpollo commented May 3, 2012

Copy link
Copy Markdown
Author

clever! didn't cross my mind at the time of writing, thanks for that

@mrpollo

mrpollo commented May 4, 2012

Copy link
Copy Markdown
Author

@wuman thanks for the help, i updated the gist to reflect your contribution and decided to fix my Proxy object there was no point on that IF condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment