Introduction

Here we will be discussing the Callee property in javascript. It is used to specify the body text of the current function being executed.
For Ex:
  1. <html>
  2. <head>
  3. <title> New Document </title>
  4. <script language="JavaScript">
  5. function chkCallee()
  6. {
  7. var txt = arguments[0].value;
  8. txt += arguments[1];
  9. alert(txt);
  10. document.write(arguments.callee.toString());
  11. }
  12. </script>
  13. </head>
  14. <body>
  15. <input type="button" value="First" OnClick=chkCallee(this,"Grade")>
  16. <input type="button" value="Second" OnClick=chkCallee(this,"Grade")>
  17. <input type="button" value="Third" OnClick=chkCallee(this,"Grade")>
  18. </body>
  19. </html>
The output will be:

1.png
When we click on the first button
2.png
3.png