Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- var Wrap=(function(){
- function User(name){
- this.name=name;
- }
- var q=function(){
- return "Thank you coming in "+this.name;
- };
- User.prototype.thankForLoggingIn=q;
- return User;
- })();
- console.log ( new Wrap("John").thankForLoggingIn() );
- //new Wrap("John").thankForLoggingIn
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">var Wrap=(function(){
- function User(name){
- this.name=name;
- }
- var q=function(){
- return "Thank you coming in "+this.name;
- };
- User.prototype.thankForLoggingIn=q;
- return User;
- })();
- console.log ( new Wrap("John").thankForLoggingIn() );
- //new Wrap("John").thankForLoggingIn</script></body>
- </html>
Add Comment
Please, Sign In to add comment