DEV Community

ZhiHong Chua
ZhiHong Chua

Posted on • Edited on

Frontend Fundamentals 4/20

1. Explain the concept of "hoisting" in JavaScript

The part about var, let, and const I know well. After revising, I know that import and function also is executed (created) before the rest of the code in the file is executed, hence returning undefined, or in function it just works.

🚨 Also, should see what follow up questions they might ask..

2. Data Merging

Done! I guess some tools needed googling, but as long as the algorithm is steady and time complexity decent, it should work out? Hmm

3. Is there any reason you'd want to use translate() instead of absolute positioning, or vice-versa? And why?

Got the point on breaking flow of page VS not doing so. 🚨 To retest on efficiency

4. What is a closure in JavaScript, and how/why would you use one?

5. What are the pros and cons of using Promises instead of callbacks in JavaScript?

Top comments (0)