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?

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs