pastebin - collaborative debugging tool
kpaste.net RSS


Hoisting
Posted by Anonymous on Tue 19th Nov 2024 13:39
raw | new post
modification of post by Anonymous (view diff)

  1. console.log(a);  // undefined
  2.  
  3. var a = 2;
  4. console.log(a);  // 2
  5.  
  6.  
  7. greet();
  8. function greet (){
  9.     console.log("GHello Boy");  // GHello Boy
  10. }
  11.  
  12. greet1();
  13. var greet1 = () => {
  14.     console.log("GHello Boy 1");  // GHello Boy
  15. }
  16.  
  17. const Rectangle = class {
  18.     //
  19. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at