Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script type="text/javascript">
- var greet = function(callback) {
- var todaysGreeting = "Hello";
- callback(todaysGreeting);
- }
- a = greet(function(name){
- return name;
- });
- function Greeter (name) {
- this.name = name;
- this.run = getGreetInfo;
- }
- function getGreetInfo() {
- return ( a + this.name);
- }
- alert((new Greeter("world!")).run());
- alert((new Greeter("universe!")).run());
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement