+
+## 이게 뭔가요? (What is this?)
+
+일반적인 소프트웨어 엔지니어 면접과 달리 프론트엔드 취업 면접은 알고리즘에 대한 강조가 적으며 프론트엔드 도메인에 대한 복잡한 지식과 전문 지식 (HTML, CSS, JavaScript)에 대해 더 많은 질문을 받습니다.
+
+프론트엔드 개발자가 인터뷰를 준비하는 데 도움이 되는 기존 리소스가 있지만 소프트웨어 엔지니어 인터뷰 자료만큼 풍부하지는 않습니다. 기존 리소스 중에서 가장 유용한 질문은 [프론트엔드 개발자 인터뷰 질문(Front-end Developer Interview Questions)](https://github.com/h5bp/Front-end-Developer-Interview-Questions) 일 것입니다. 안타깝게도, 저는 온라인에서 이 질문에 대한 완전하고 만족스러운 대답을 찾을 수 없었습니다. 그래서 여기에 이 질문에 대답하고자 합니다. 오픈 소스 저장소이기 때문에 이 프로젝트는 커뮤니티의 지원을 받아 커질 수 있을 것입니다.
+
+## 일반적인 면접 준비는? (Looking for Generic Interview Preparation?)
+
+[면접 치트시트(interview cheatsheet)](https://github.com/yangshun/tech-interview-handbook/blob/master/preparing/cheatsheet.md)나 알고리즘과 같은 일반적인 코딩 면접에 대한 내용은 [기술 면접 핸드북(Tech Interview Handbook)](https://github.com/yangshun/tech-interview-handbook)이 도움이 될 것입니다.
+
+## 목차 (Table of Contents)
+
+**[HTML Questions](#html-questions)**
+
+- [What does a doctype do?](#what-does-a-doctype-do)
+- [How do you serve a page with content in multiple languages?](#how-do-you-serve-a-page-with-content-in-multiple-languages)
+- [What kind of things must you be wary of when design or developing for multilingual sites?](#what-kind-of-things-must-you-be-wary-of-when-designing-or-developing-for-multilingual-sites)
+- [What are `data-` attributes good for?](#what-are-data--attributes-good-for)
+- [Consider HTML5 as an open web platform. What are the building blocks of HTML5?](#consider-html5-as-an-open-web-platform-what-are-the-building-blocks-of-html5)
+- [Describe the difference between a `cookie`, `sessionStorage` and `localStorage`.](#describe-the-difference-between-a-cookie-sessionstorage-and-localstorage)
+- [Describe the difference between `
+
+
+```
+
+```js
+// File loaded from https://example.com?callback=printData
+printData({ name: 'Yang Shun' });
+```
+
+The client has to have the `printData` function in its global scope and the function will be executed by the client when the response from the cross-origin domain is received.
+
+JSONP can be unsafe and has some security implications. As JSONP is really JavaScript, it can do everything else JavaScript can do, so you need to trust the provider of the JSONP data.
+
+These days, [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) is the recommended approach and JSONP is seen as a hack.
+
+###### References
+
+-
+
+### Have you ever used JavaScript templating? If so, what libraries have you used?
+
+Yes. Handlebars, Underscore, Lodash, AngularJS and JSX. I disliked templating in AngularJS because it made heavy use of strings in the directives and typos would go uncaught. JSX is my new favourite as it is closer to JavaScript and there is barely any syntax to learn. Nowadays, you can even use ES2015 template string literals as a quick way for creating templates without relying on third-party code.
+
+```js
+const template = `
My name is: ${name}
`;
+```
+
+However, do be aware of a potential XSS in the above approach as the contents are not escaped for you, unlike in templating libraries.
+
+### Explain "hoisting".
+
+Hoisting is a term used to explain the behavior of variable declarations in your code. Variables declared or initialized with the `var` keyword will have their declaration "hoisted" up to the top of the current scope. However, only the declaration is hoisted, the assignment (if there is one), will stay where it is. Let's explain with a few examples.
+
+```js
+// var declarations are hoisted.
+console.log(foo); // undefined
+var foo = 1;
+console.log(foo); // 1
+
+// let/const declarations are NOT hoisted.
+console.log(bar); // ReferenceError: bar is not defined
+let bar = 2;
+console.log(bar); // 2
+```
+
+Function declarations have the body hoisted while the function expressions (written in the form of variable declarations) only has the variable declaration hoisted.
+
+```js
+// Function Declaration
+console.log(foo); // [Function: foo]
+foo(); // 'FOOOOO'
+function foo() {
+ console.log('FOOOOO');
+}
+console.log(foo); // [Function: foo]
+
+// Function Expression
+console.log(bar); // undefined
+bar(); // Uncaught TypeError: bar is not a function
+var bar = function() {
+ console.log('BARRRR');
+};
+console.log(bar); // [Function: bar]
+```
+
+### Describe event bubbling.
+
+When an event triggers on a DOM element, it will attempt to handle the event if there is a listener attached, then the event is bubbled up to its parent and the same thing happens. This bubbling occurs up the element's ancestors all the way to the `document`. Event bubbling is the mechanism behind event delegation.
+
+### What's the difference between an "attribute" and a "property"?
+
+Attributes are defined on the HTML markup but properties are defined on the DOM. To illustrate the difference, imagine we have this text field in our HTML: ``.
+
+```js
+const input = document.querySelector('input');
+console.log(input.getAttribute('value')); // Hello
+console.log(input.value); // Hello
+```
+
+But after you change the value of the text field by adding "World!" to it, this becomes:
+
+```js
+console.log(input.getAttribute('value')); // Hello
+console.log(input.value); // Hello World!
+```
+
+###### References
+
+-
+
+### Why is extending built-in JavaScript objects not a good idea?
+
+Extending a built-in/native JavaScript object means adding properties/functions to its `prototype`. While this may seem like a good idea at first, it is dangerous in practice. Imagine your code uses a few libraries that both extend the `Array.prototype` by adding the same `contains` method, the implementations will overwrite each other and your code will break if the behavior of these two methods are not the same.
+
+The only time you may want to extend a native object is when you want to create a polyfill, essentially providing your own implementation for a method that is part of the JavaScript specification but might not exist in the user's browser due to it being an older browser.
+
+###### References
+
+-
+
+### Difference between document `load` event and document `DOMContentLoaded` event?
+
+The `DOMContentLoaded` event is fired when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading.
+
+`window`'s `load` event is only fired after the DOM and all dependent resources and assets have loaded.
+
+###### References
+
+-
+-
+
+### What is the difference between `==` and `===`?
+
+`==` is the abstract equality operator while `===` is the strict equality operator. The `==` operator will compare for equality after doing any necessary type conversions. The `===` operator will not do type conversion, so if two values are not the same type `===` will simply return `false`. When using `==`, funky things can happen, such as:
+
+```js
+1 == '1'; // true
+1 == [1]; // true
+1 == true; // true
+0 == ''; // true
+0 == '0'; // true
+0 == false; // true
+```
+
+My advice is never to use the `==` operator, except for convenience when comparing against `null` or `undefined`, where `a == null` will return `true` if `a` is `null` or `undefined`.
+
+```js
+var a = null;
+console.log(a == null); // true
+console.log(a == undefined); // true
+```
+
+###### References
+
+-
+
+### Explain the same-origin policy with regards to JavaScript.
+
+The same-origin policy prevents JavaScript from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname, and port number. This policy prevents a malicious script on one page from obtaining access to sensitive data on another web page through that page's Document Object Model.
+
+###### References
+
+-
+
+### Make this work:
+
+```js
+duplicate([1, 2, 3, 4, 5]); // [1,2,3,4,5,1,2,3,4,5]
+```
+
+```js
+function duplicate(arr) {
+ return arr.concat(arr);
+}
+
+duplicate([1, 2, 3, 4, 5]); // [1,2,3,4,5,1,2,3,4,5]
+```
+
+### Why is it called a Ternary expression, what does the word "Ternary" indicate?
+
+"Ternary" indicates three, and a ternary expression accepts three operands, the test condition, the "then" expression and the "else" expression. Ternary expressions are not specific to JavaScript and I'm not sure why it is even in this list.
+
+###### References
+
+-
+
+### What is `"use strict";`? What are the advantages and disadvantages to using it?
+
+'use strict' is a statement used to enable strict mode to entire scripts or individual functions. Strict mode is a way to opt in to a restricted variant of JavaScript.
+
+Advantages:
+
+- Makes it impossible to accidentally create global variables.
+- Makes assignments which would otherwise silently fail to throw an exception.
+- Makes attempts to delete undeletable properties throw (where before the attempt would simply have no effect).
+- Requires that function parameter names be unique.
+- `this` is undefined in the global context.
+- It catches some common coding bloopers, throwing exceptions.
+- It disables features that are confusing or poorly thought out.
+
+Disadvantages:
+
+- Many missing features that some developers might be used to.
+- No more access to `function.caller` and `function.arguments`.
+- Concatenation of scripts written in different strict modes might cause issues.
+
+Overall, I think the benefits outweigh the disadvantages, and I never had to rely on the features that strict mode blocks. I would recommend using strict mode.
+
+###### References
+
+-
+-
+
+### Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, **"buzz"** at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5`.
+
+Check out this version of FizzBuzz by [Paul Irish](https://gist.github.com/jaysonrowe/1592432#gistcomment-790724).
+
+```js
+for (let i = 1; i <= 100; i++) {
+ let f = i % 3 == 0,
+ b = i % 5 == 0;
+ console.log(f ? (b ? 'FizzBuzz' : 'Fizz') : b ? 'Buzz' : i);
+}
+```
+
+I would not advise you to write the above during interviews though. Just stick with the long but clear approach. For more wacky versions of FizzBuzz, check out the reference link below.
+
+###### References
+
+-
+
+### Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?
+
+Every script has access to the global scope, and if everyone is using the global namespace to define their own variables, there will bound to be collisions. Use the module pattern (IIFEs) to encapsulate your variables within a local namespace.
+
+### Why would you use something like the `load` event? Does this event have disadvantages? Do you know any alternatives, and why would you use those?
+
+The `load` event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images, scripts, links and sub-frames have finished loading.
+
+The DOM event `DOMContentLoaded` will fire after the DOM for the page has been constructed, but do not wait for other resources to finish loading. This is preferred in certain cases when you do not need the full page to be loaded before initializing.
+
+TODO.
+
+###### References
+
+-
+
+### Explain what a single page app is and how to make one SEO-friendly.
+
+The below is taken from the awesome [Grab Front End Guide](https://github.com/grab/front-end-guide), which coincidentally, is written by me!
+
+Web developers these days refer to the products they build as web apps, rather than websites. While there is no strict difference between the two terms, web apps tend to be highly interactive and dynamic, allowing the user to perform actions and receive a response for their action. Traditionally, the browser receives HTML from the server and renders it. When the user navigates to another URL, a full-page refresh is required and the server sends fresh new HTML for the new page. This is called server-side rendering.
+
+However in modern SPAs, client-side rendering is used instead. The browser loads the initial page from the server, along with the scripts (frameworks, libraries, app code) and stylesheets required for the whole app. When the user navigates to other pages, a page refresh is not triggered. The URL of the page is updated via the [HTML5 History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API). New data required for the new page, usually in JSON format, is retrieved by the browser via [AJAX](https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started) requests to the server. The SPA then dynamically updates the page with the data via JavaScript, which it has already downloaded in the initial page load. This model is similar to how native mobile apps work.
+
+The benefits:
+
+- The app feels more responsive and users do not see the flash between page navigations due to full-page refreshes.
+- Fewer HTTP requests are made to the server, as the same assets do not have to be downloaded again for each page load.
+- Clear separation of the concerns between the client and the server; you can easily build new clients for different platforms (e.g. mobile, chatbots, smart watches) without having to modify the server code. You can also modify the technology stack on the client and server independently, as long as the API contract is not broken.
+
+The downsides:
+
+- Heavier initial page load due to loading of framework, app code, and assets required for multiple pages.
+- There's an additional step to be done on your server which is to configure it to route all requests to a single entry point and allow client-side routing to take over from there.
+- SPAs are reliant on JavaScript to render content, but not all search engines execute JavaScript during crawling, and they may see empty content on your page. This inadvertently hurts the Search Engine Optimization (SEO) of your app. However, most of the time, when you are building apps, SEO is not the most important factor, as not all the content needs to be indexable by search engines. To overcome this, you can either server-side render your app or use services such as [Prerender](https://prerender.io/) to "render your javascript in a browser, save the static HTML, and return that to the crawlers".
+
+###### References
+
+-
+-
+-
+-
+
+### What is the extent of your experience with Promises and/or their polyfills?
+
+Possess working knowledge of it. A promise is an object that may produce a single value some time in the future: either a resolved value, or a reason that it's not resolved (e.g., a network error occurred). A promise may be in one of 3 possible states: fulfilled, rejected, or pending. Promise users can attach callbacks to handle the fulfilled value or the reason for rejection.
+
+Some common polyfills are `$.deferred`, Q and Bluebird but not all of them comply to the specification. ES2015 supports Promises out of the box and polyfills are typically not needed these days.
+
+###### References
+
+-
+
+### What are the pros and cons of using Promises instead of callbacks?
+
+**Pros**
+
+- Avoid callback hell which can be unreadable.
+- Makes it easy to write sequential asynchronous code that is readable with `.then()`.
+- Makes it easy to write parallel asynchronous code with `Promise.all()`.
+
+**Cons**
+
+- Slightly more complex code (debatable).
+- In older browsers where ES2015 is not supported, you need to load a polyfill in order to use it.
+
+### What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?
+
+Some examples of languages that compile to JavaScript include CoffeeScript, Elm, ClojureScript, PureScript and TypeScript.
+
+Advantages:
+
+- Fixes some of the longstanding problems in JavaScript and discourages JavaScript anti-patterns.
+- Enables you to write shorter code, by providing some syntactic sugar on top of JavaScript, which I think ES5 lacks, but ES2015 is awesome.
+- Static types are awesome (in the case of TypeScript) for large projects that need to be maintained over time.
+
+Disadvantages:
+
+- Require a build/compile process as browsers only run JavaScript and your code will need to be compiled into JavaScript before being served to browsers.
+- Debugging can be a pain if your source maps do not map nicely to your pre-compiled source.
+- Most developers are not familiar with these languages and will need to learn it. There's a ramp up cost involved for your team if you use it for your projects.
+- Smaller community (depends on the language), which means resources, tutorials, libraries and tooling would be harder to find.
+- IDE/editor support might be lacking.
+- These languages will always be behind the latest JavaScript standard.
+- Developers should be cognizant of what their code is being compiled to — because that is what would actually be running, and that is what matters in the end.
+
+Practically, ES2015 has vastly improved JavaScript and made it much nicer to write. I don't really see the need for CoffeeScript these days.
+
+###### References
+
+-
+
+### What tools and techniques do you use for debugging JavaScript code?
+
+- React and Redux
+ - [React Devtools](https://github.com/facebook/react-devtools)
+ - [Redux Devtools](https://github.com/gaearon/redux-devtools)
+- JavaScript
+ - [Chrome Devtools](https://hackernoon.com/twelve-fancy-chrome-devtools-tips-dc1e39d10d9d)
+ - `debugger` statement
+ - Good old `console.log` debugging
+
+###### References
+
+-
+-
+
+### What language constructions do you use for iterating over object properties and array items?
+
+For objects:
+
+- `for` loops - `for (var property in obj) { console.log(property); }`. However, this will also iterate through its inherited properties, and you will add an `obj.hasOwnProperty(property)` check before using it.
+- `Object.keys()` - `Object.keys(obj).forEach(function (property) { ... })`. `Object.keys()` is a static method that will lists all enumerable properties of the object that you pass it.
+- `Object.getOwnPropertyNames()` - `Object.getOwnPropertyNames(obj).forEach(function (property) { ... })`. `Object.getOwnPropertyNames()` is a static method that will lists all enumerable and non-enumerable properties of the object that you pass it.
+
+For arrays:
+
+- `for` loops - `for (var i = 0; i < arr.length; i++)`. The common pitfall here is that `var` is in the function scope and not the block scope and most of the time you would want block scoped iterator variable. ES2015 introduces `let` which has block scope and it is recommended to use that instead. So this becomes: `for (let i = 0; i < arr.length; i++)`.
+- `forEach` - `arr.forEach(function (el, index) { ... })`. This construct can be more convenient at times because you do not have to use the `index` if all you need is the array elements. There are also the `every` and `some` methods which will allow you to terminate the iteration early.
+
+Most of the time, I would prefer the `.forEach` method, but it really depends on what you are trying to do. `for` loops allow more flexibility, such as prematurely terminate the loop using `break` or incrementing the iterator more than once per loop.
+
+### Explain the difference between mutable and immutable objects.
+
+- What is an example of an immutable object in JavaScript?
+- What are the pros and cons of immutability?
+- How can you achieve immutability in your own code?
+
+TODO
+
+### Explain the difference between synchronous and asynchronous functions.
+
+Synchronous functions are blocking while asynchronous functions are not. In synchronous functions, statements complete before the next statement is run. In this case the program is evaluated exactly in order of the statements and execution of the program is paused if one of the statements take a very long time.
+
+Asynchronous functions usually accept a callback as a parameter and execution continues on the next line immediately after the asynchronous function is invoked. The callback is only invoked when the asynchronous operation is complete and the call stack is empty. Heavy duty operations such as loading data from a web server or querying a database should be done asynchronously so that the main thread can continue executing other operations instead of blocking until that long operation to complete (in the case of browsers, the UI will freeze).
+
+### What is event loop? What is the difference between call stack and task queue?
+
+The event loop is a single-threaded loop that monitors the call stack and checks if there is any work to be done in the task queue. If the call stack is empty and there are callback functions in the task queue, a function is dequeued and pushed onto the call stack to be executed.
+
+If you haven't already checked out Philip Robert's [talk on the Event Loop](https://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html), you should. It is one of the most viewed videos on JavaScript.
+
+###### References
+
+-
+-
+
+### Explain the differences on the usage of `foo` between `function foo() {}` and `var foo = function() {}`
+
+The former is a function declaration while the latter is a function expression. The key difference is that function declarations have its body hoisted but the bodies of function expressions are not (they have the same hoisting behaviour as variables). For more explanation on hoisting, refer to the question above on hoisting. If you try to invoke a function expression before it is defined, you will get an `Uncaught TypeError: XXX is not a function` error.
+
+**Function Declaration**
+
+```js
+foo(); // 'FOOOOO'
+function foo() {
+ console.log('FOOOOO');
+}
+```
+
+**Function Expression**
+
+```js
+foo(); // Uncaught TypeError: foo is not a function
+var foo = function() {
+ console.log('FOOOOO');
+};
+```
+
+###### References
+
+-
+
+### What are the differences between variables created using `let`, `var` or `const`?
+
+Variables declared using the `var` keyword are scoped to the function in which they are created, or if created outside of any function, to the global object. `let` and `const` are _block scoped_, meaning they are only accessible within the nearest set of curly braces (function, if-else block, or for-loop).
+
+```js
+function foo() {
+ // All variables are accessible within functions
+ var bar = 'bar';
+ let baz = 'baz';
+ const qux = 'qux';
+
+ console.log(bar); // "bar"
+ console.log(baz); // "baz"
+ console.log(qux); // "qux"
+}
+
+console.log(bar); // ReferenceError: bar is not defined
+console.log(baz); // ReferenceError: baz is not defined
+console.log(qux); // ReferenceError: qux is not defined
+
+if (true) {
+ var bar = 'bar';
+ let baz = 'baz';
+ const qux = 'qux';
+}
+// var declared variables are accessible anywhere in the function scope
+console.log(bar); // "bar"
+// let and const defined variables are not accessible outside of the block they were defined in
+console.log(baz); // ReferenceError: baz is not defined
+console.log(qux); // ReferenceError: qux is not defined
+```
+
+`var` allows variables to be hoisted, meaning they can be referenced in code before they are declared. `let` and `const` will not allow this, instead throwing an error.
+
+```js
+console.log(foo); // undefined
+
+var foo = 'foo';
+
+console.log(baz); // ReferenceError: can't access lexical declaration `baz' before initialization
+
+let baz = 'baz';
+
+console.log(bar); // ReferenceError: can't access lexical declaration `bar' before initialization
+
+const bar = 'bar';
+```
+
+Redeclaring a variable with `var` will not throw an error, but 'let' and 'const' will.
+
+```js
+var foo = 'foo';
+var foo = 'bar';
+console.log(foo); // "bar"
+
+let baz = 'baz';
+let baz = 'qux'; // SyntaxError: redeclaration of let baz
+```
+
+`let` and `const` differ in that `let` allows reassigning the variable's value while `const` does not.
+
+```js
+// this is fine
+let foo = 'foo';
+foo = 'bar';
+
+// this causes an exception
+const baz = 'baz';
+baz = 'qux';
+```
+
+###### References
+
+-
+-
+-
+
+### What are the differences between ES6 class and ES5 function constructors?
+
+TODO
+
+### Can you offer a use case for the new arrow => function syntax? How does this new syntax differ from other functions?
+
+TODO
+
+### What advantage is there for using the arrow syntax for a method in a constructor?
+
+TODO
+
+### What is the definition of a higher-order function?
+
+A higher-order function is any function that takes another function as a parameter, which it uses to operate on some data, or returns a function as a result. Higher-order functions are meant to abstract some operation that is performed repeatedly. The classic example of this is `map`, which takes an array and a function as arguments. `map` then uses this function to transform each item in the array, returning a new array with the transformed data. Other popular examples in JavaScript are `forEach`, `filter`, and `reduce`. A higher-order function doesn't just need to be manipulating arrays as there are many use cases for returning a function from another function. `Array.prototype.bind` is one such example in JavaScript.
+
+##### Map
+
+Let say we have an array of names which we need to transform each element to uppercase string.
+
+`const names = ['irish', 'daisy', 'anna']`;
+
+The imperative way will be like:
+
+```js
+const transformNamesToUppercase = names => {
+ const results = [];
+ for (let i = 0; i < names.length; i++) {
+ results.push(names[i].toUpperCase());
+ }
+ return results;
+};
+transformNamesToUppercase(names); // ['IRISH', 'DAISY', 'ANNA']
+```
+
+Use `.map(transformerFn)` to become more simplified, easy to reason about and declarative.
+
+```js
+const transformNamesToUppercase = names =>
+ names.map(name => name.toUpperCase());
+transformNamesToUppercase(names); // ['IRISH', 'DAISY', 'ANNA']
+```
+
+##### Filter
+
+We want to filter all names which their initial character starts with **i**.
+
+The imperative way will be like:
+
+```js
+const filterNames = names => {
+ const results = [];
+ for (let i = 0; i < names.length; i++) {
+ const name = names[i];
+ if (name.startsWith('i')) {
+ results.push(name);
+ }
+ }
+ return results;
+};
+filterNames(names); // ['IRISH']
+```
+
+Instead using `for loop`, use `.filter(predicateFn)` to look more declarative.
+
+```js
+const filterNames = names => names.filter(name => name.startsWith('i'));
+filterNames(names); // ['IRISH']
+```
+
+##### Reduce
+
+Sum all the values of an array
+
+`const numbers = [1,2,3,4,5];`
+
+Imperative way:
+
+```js
+const sumOfNumbers = numbers => {
+ let sum = 0;
+ for (let i = 0; i < numbers.length; i++) {
+ sum += numbers[i];
+ }
+ return sum;
+};
+sumOfNumbers(numbers); // 15
+```
+
+More declarative using `.reduce(reducerFn)`:
+
+```js
+const sumOfNumbers = numbers =>
+ numbers.reduce((total, number) => (total += number), 0);
+sumOfNumbers(numbers); // 15
+```
+
+Use **higher-order function** to make your code easy to reason about and improve the quality of your code. This became your code more **declarative** instead imperative, say **what you want done** not **how to do it**.
+
+###### References
+
+-
+-
+-
+
+### Can you give an example for destructuring an object or an array?
+
+TODO
+
+### ES6 Template Literals offer a lot of flexibility in generating strings, can you give an example?
+
+TODO
+
+### Can you give an example of a curry function and why this syntax offers an advantage?
+
+Currying is a pattern where a function with more than one parameter is broken into multiple functions that, when called in series, will accumulate all of the required parameters one at a time. This technique can be useful for making code written in a functional style easier to read and compose. It's important to note that for a function to be curried, it needs to start out as one function, then broken out into a sequence of functions that each take one parameter.
+
+```js
+function curry(fn) {
+ if (fn.length === 0) {
+ return fn;
+ }
+
+ function _curried(depth, args) {
+ return function(newArgument) {
+ if (depth - 1 === 0) {
+ return fn(...args, newArgument);
+ }
+ return _curried(depth - 1, [...args, newArgument]);
+ };
+ }
+
+ return _curried(fn.length, []);
+}
+
+function add(a, b) {
+ return a + b;
+}
+
+var curriedAdd = curry(add);
+var addFive = curriedAdd(5);
+
+var result = [0, 1, 2, 3, 4, 5].map(addFive); // [5, 6, 7, 8, 9, 10]
+```
+
+###### References
+
+-
+
+### What are the benefits of using spread syntax and how is it different from rest syntax?
+
+ES6's spread syntax is very useful when coding in a functional paradigm as we can easily create copies of arrays or objects without resorting to `Object.create`, `slice`, or a library function. This language feature gets a lot of use in projects using Redux or RX.js.
+
+```js
+function putDookieInAnyArray(arr) {
+ return [...arr, 'dookie'];
+}
+
+var result = putDookieInAnyArray(['I', 'really', "don't", 'like']); // ["I", "really", "don't", "like", "dookie"]
+
+var person = {
+ name: 'Todd',
+ age: 29,
+};
+
+var copyOfTodd = { ...person };
+```
+
+ES6's rest syntax offers a shorthand for including an arbitrary number of arguments to be passed to a function. It is like an inverse of the spread syntax, taking data and stuffing it into an array rather than upacking an array of data, but it only works in function arguments.
+
+```js
+function addFiveToABunchOfNumbers(...numbers) {
+ return numbers.map(x => x + 5);
+}
+
+var result = addFiveToABunchOfNumbers(4, 5, 6, 7, 8, 9, 10); // [9, 10, 11, 12, 13, 14, 15]
+```
+
+###### References
+
+-
+-
+
+### How can you share code between files?
+
+TODO
+
+### Why you might want to create static class members?
+
+TODO
+
+### Other Answers
+
+-
+
+## Related
+
+If you are interested in how data structures are implemented, check out [Lago](https://github.com/yangshun/lago), a Data Structures and Algorithms library for JavaScript. It is pretty much still WIP but I intend to make it into a library that is able to be used in production and also a reference resource for revising Data Structures and Algorithms.
+
+## Contributing
+
+Feel free to make pull requests to correct any mistakes in the answers or suggest new questions.