File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes function as an argument to eval Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "function as an argument to eval" Watch "function as an argument to eval" New topic
Author

function as an argument to eval

Anu Charitha
Greenhorn

Joined: Apr 07, 2009
Posts: 4
What does eval(function myFunc(){alert("Anu");} do? I tried it in my browser and it printed the function in the browser? Is that it?
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

Where did this silly code come from? Please include some context in your posts.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
 
subject: function as an argument to eval
 
Threads others viewed
Checking a Boolean Value In JavaScript
Problem in Comparing Values; 7>14 returns true????
'Syntax error'?
Variable Expressions.
Error when string is passed from JSP
developer file tools