Key Concepts to Mastering CSS

1. Introduction to CSS

Anatomy of a CSS Rule

  • The rule targets any elements with the class header & any element with this class will have a…


Build Better REST APIs

1. Automate Caching

  • Repeated request and responding to those request consumes resources and this becomes a sign of flawed design. To solve this problem you must store data fetched from the API on the server and serve later from there.
  • However, there are times when the data becomes outdated and needs to be updated, in this case, we have some industry caching solutions (Redis and Amazon ElasticCache) that can cache data even after making changes.

2. API Documentation


1. cypress

Fast and reliable testing for anything that runs in a browser.


Part 6: 17 More JavaScript Coding Interview Questions

1. Use RegExp literal notation when the RegExp will be changing & use the RegExp constructor function when the RegExp will remain constant. Is that true?

  • No, this is the opposite.
  • Use RegExp constructor notation when the RegExp will be changing.
  • And use the RegExp literal notation when the RegExp will remain constant.

2. Promises are asynchronous in JavaScript. Is that true?

  • No, they are synchronous, still, they can perform async actions such as making calls to an API.

3. What’s the purpose of web workers?

  • To execute expensive tasks on a separate thread than the main thread.

4. What type of object will Promise.resolve return?

  • A promise in a resolved state with a given resolved value.

5. What’s the difference between setTimeout() and setInterval()?

  • setTimeout executes once after a specified time has elapsed.
  • setInterval executes repeatedly with a given delay between executions.

6. What’s the difference between importing a default export, named, and a non-deafult export?

  • Curly braces.

7. Function declarations are hoisted, function expressions are not hoisted. Is that true?

  • Yes

8. What statement shows the url from which a module was imported?

  • import.meta, this will work if experimental support for import.meta is on.

9. What is the difference between console.log, console.error, and console.warn?

  • All…


Part 5: 13 More JavaScript Coding Interview Questions

1. Which properties give access to the global object regardless of the environment?

  • globalThis

2. What will be the console output and why?


Part 4: 11 More JavaScript Coding Interview Questions

1. What is a wrapper object when considering coercion?

  • It can be a wrapper around a primitive to give the primitive properties.
  • For example, when attr is wrapped in a String object when we try to access the String object properties.


11 JavaScript Coding Interview Questions.

1. What is a Generator Function in JavaScript?

  • According to MDN Docs: Generators are functions that can be exited and re-entered later. For example, a while-loop in a generator function can be paused.

2. What’s the difference between RegExp literal notation and constructor?

  • The literal notation’s parameters are enclosed between slashes and have no quotation marks.
  • The constructor function does not use slashes but has quotes.
  • The literal notation is evaluated at compile time.
  • The constructor is evaluated at runtime.

3. A do-while loop always executes at least once. Is that true?

  • Yes, the ‘do’ part of the do-while loop is entered into before any truthy evaluation is processed.

4. What data types does JSON support?

  • string
  • number
  • object
  • null
  • array
  • boolean

5. What will be the console output?


Build Blazing Fast Web Applications

  • For most cases in web applications, when JavaScript displays the content to provide the functionality, loading the DOM quickly becomes very hard. In JavaScript, it is very common for scripts to wait until the DOM has done loading before they start running. Especially a web application with a large number of images will suffer a bad user experience in such cases.
  • Optimization of assets in…

Mohit

I Make Mobile Apps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store