https://github.com/errec/front-end-interview-answers
My answers for https://github.com/h5bp/Front-end-Developer-Interview-Questions
https://github.com/errec/front-end-interview-answers
Last synced: 4 months ago
JSON representation
My answers for https://github.com/h5bp/Front-end-Developer-Interview-Questions
- Host: GitHub
- URL: https://github.com/errec/front-end-interview-answers
- Owner: Errec
- Created: 2017-06-08T00:19:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-29T20:58:38.000Z (over 8 years ago)
- Last Synced: 2025-10-20T03:11:26.370Z (9 months ago)
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Front-end Job Interview Questions: My Answers!
This file contains my personal(some research included in 'personal') answers to a number of front-end interview questions from [https://github.com/h5bp/Front-end-Developer-Interview-Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)
## Table of Contents
1. [General Questions](#general-questions)
1. [HTML Questions](#html-questions)
1. [CSS Questions](#css-questions)
1. [JS Questions](#js-questions)
1. [Testing Questions](#testing-questions)
1. [Performance Questions](#performance-questions)
1. [Network Questions](#network-questions)
1. [Coding Questions](#coding-questions)
#### General Questions:
* What did you learn yesterday/this week?
*Object.create is a constructor pattern created by Douglas Crockford to offer a less "obscured" method than the 'new Object'.*
* What excites or interests you about coding?
*The infinite possibilities, the power of creation.*
#### HTML Questions:
* What does a `doctype` do?
*Doctype is a required declaration to inform the brower the HTML version used in the page, also required for legacy reasons.*
* What's the difference between full standards mode, almost standards mode and quirks mode?
*It's possible to define through the 'doctype' declaration in wich mode the template engine will operate:*
1 - Full standard mode: the behavior described by the current HTML and CSS specifications
2 - Almost standards mode: includes some quirks implementation
3 - Layout emulates nonstandard behavior, its used for legacy
#### CSS Questions:
* What is the difference between classes and IDs in CSS?
*1 - Class uses a period(.) followed by the name of the class, can be used on a group of elements with common attributes.*
*2 - ID uses the hash(#) followed by the name of the ID, should be unique and it's more specificic than classes(overrides the same attributes setted by classes of that element).*
#### JS Questions:
* Explain event delegation
*A pattern used to assign an event handler to the parent or a common ancestor of the elements. Is commonly used to avoid batch assignments.*
#### Testing Questions:
* What are some advantages/disadvantages to testing your code?
* Advantages: reduces code refactoring time, reduces long-term costs, delivery a safer code.*
* Advantages: increases workflow complexibility, increases short-term costs.*
#### Performance Questions:
* What tools would you use to find a performance bug in your code?
*Chrome Devtools Timeline with the paint flashing option on.*
#### Network Questions:
* Traditionally, why has it been better to serve site assets from multiple domains?
*HTTP1.1 can't handle multiplexing, only one request can be outstanding on a connection at a time using the current protocol. One workaround is to use multiple source domains.*
#### Coding Questions:
* Question: What is the value of `foo`? *
```javascript
var foo = 10 + '20';
```
*Due to JS internal type coercion rules, the result is the string "1020"*