DEV Community

ZhiHong Chua
ZhiHong Chua

Posted on • Edited on

Frontend Fundamentals 5/20

1. Describe the difference between <script>, <script async> and <script defer>

🚨 Recall which one is for critical scripts and which is for auxiliary (ads etc).

2. Debounce

Revisting GFE, I understand the need to pass the context of this via function.apply. But exactly how and why, I'm still not sure. Perhaps I need to do... Leetcode's Debounce.

Ok nevermind, seems it's more watered-down without needing to pass context like this.

3. Todo List

event.target.value and setState good.

4. Promise.all

Re-tried this a few days later and it's super easy! Guess I got a better hang of Promises.

5. Holy Grail

🚨 quite good, but can be cleaner in code, more responsive design

6. Throttle

Bonus Question! This was easy after having solved for debounce. But there are some subtleties I still don't understand.

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)