DEV Community

loading...

Hoisting

christianotieno profile image Christian Otieno ・1 min read

One of the advantages of JavaScript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code.

Discussion (2)

Collapse
alemagio profile image
Alessandro Magionami

And is a disadvantage too when you consider variables...

Collapse
christianotieno profile image
Forem Open with the Forem app