Advertisement
Guest User

Untitled

a guest
Jan 14th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     function lol() {
  3.         console.log("LOL");
  4.     }
  5. }
  6.  
  7. lol();  // possible, same as [var lol = function..]
  8.  
  9.  
  10. {
  11.     let kek = function() {
  12.         console.log("KEK");
  13.     }
  14.     kek();  // works
  15. }
  16.  
  17. kek();  // error, as expected
  18.  
  19.  
  20. {
  21.     let function rofl() {  // syntax error..
  22.         console.log("ROFL");
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement