Front-end-Developer-Intervi.../translations/************/index.html

2 lines
32 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html><html lang="en" itemscope itemtype="https://schema.org/Article"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Front End Developer Interview Questions ★ Front-end Developer Interview Questions</title><meta name="description" content="A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore."><meta name="keywords" content="front-end, interview questions, css questions, js questions, html questions, performance questions, interview test"><meta name="author" content="Front-end Developer Interview Questions"><meta itemprop="author" content="Front-end Developer Interview Questions"><meta itemprop="name" content="Front End Developer Interview Questions ★ Front-end Developer Interview Questions"><meta itemprop="description" content="A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore."><meta itemprop="image" content="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/og-image.png"><meta property="og:title" content="Front End Developer Interview Questions ★ Front-end Developer Interview Questions"><meta property="og:description" content="A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore."><meta property="og:url" content="https://h5bp.org/Front-end-Developer-Interview-Questions//translations/************/"><meta property="og:site_name" content="Front-end Developer Interview Questions"><meta property="og:image" content="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/og-image.png"><meta property="og:type" content="website"><meta property="og:locale" content="en_US"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="Front End Developer Interview Questions ★ Front-end Developer Interview Questions"><meta name="twitter:description" content="A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore."><meta name="twitter:site" content="@h5bp"><meta name="twitter:image" content="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/og-image.png"><meta name="twitter:creator" content="@h5bp"><link type="image/png" rel="apple-touch-icon" href="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/apple-touch-icon.png"><link type="image/png" sizes="32x32" rel="icon" href="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/favicon-32x32.png"><link type="image/png" sizes="16x16" rel="icon" href="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/favicon-32x32.png"><link type="image/png" color="#181818" rel="mask-icon" href="https://h5bp.org/Front-end-Developer-Interview-Questions//assets/images/favicon-96x96.png"><meta name="mobile-web-app-capable" content="yes"><meta name="robots" content="index,follow"><script>console.log(page.lang)</script><style>code[class*=language-],pre[class*=language-]{color:#c5c8c6;text-shadow:0 1px rgba(0,0,0,.3);font-family:Inconsolata,Monaco,Consolas,'Courier New',Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#370b44}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#7c7c7c}.token.punctuation{color:#c5c8c6}.namespace{opacity:.7}.token.keyword,.token.property,.token.tag{color:#96cbfe}.token.class-name{color:#ffffb6;text-decoration:underline}.token.boolean,.token.constant{color:#9c9}.token.deleted,.token.symbol{color:#f92672}.token.number{color:#ff73fd}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a8ff60}.token.variable{color:#c6c5fe}.token.operator{color:#ededed}.token.entity{color:#ffffb6}.token.url{color:#96cbfe}.language-css .token.string,.style .token.string{color:#87c38a}.token.atrule,.token.attr-value{color:#f9ee98}.token.function{color:#dad085}.token.regex{color:#e9c062}.token.important{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}:root{--font-family-heading:sans-serif;--font-family-body:Georgia,serif;--font-family-code:Menlo,Monaco,'Courier New',monospace;--color-primary:#835EFF;--color-secondary:#FF008D;--color-safe:#8338EC;--color-gradient:linear-gradient(to right, var(--color-primary), var(--color-secondary));--color-highlight:var(--color-primary);--color-gray-opacity:rgba(39,39,39,0.04);--color-heading:#23231A;--color-text:#23231A;--background-default:#F9F9F9;--border-radius-default:5px;--box-shadow-default:0 2rem 4rem rgba(0,0,0,.15);--transition-duration:0.27s}body.rtl{--font-family-body:Arial,Helvetica,sans-serif}*{margin:0;padding:0;box-sizing:border-box;outline-color:var(--color-primary)}::selection{background:var(--color-primary);color:var(--background-default)}::-moz-selection{background:var(--color-primary);color:var(--background-default)}.nav{padding:1rem 0;position:relative;font-family:var(--font-family-heading)}.nav li{word-wrap:none;white-space:nowrap}.navigation{list-style:none;display:flex;flex-wrap:wrap;font-size:1rem}.navigation-questions-label{margin-right:auto}@media (min-width:60em){.navigation-questions-label{margin-right:0}}.navigation-toggle{display:inline-block;appearance:none;border:0;font-size:1rem;font-weight:600;cursor:pointer;background:0 0}.navigation-toggle::after{content:'\25BE';padding-left:.3rem;display:inline-block;font-size:1.2rem;font-weight:700;color:var(--color-primary);transform-origin:center}.navigation-toggle:active::after,.navigation-toggle:focus::after,.navigation-toggle:hover::after{color:var(--color-secondary)}.navigation.open .navigation-toggle::after{transform:scaleY(-1) translateY(-.25em)}@media (min-width:60em){.navigation-toggle{color:var(--color-text);pointer-events:none;cursor:default}.navigation-toggle::after{display:none}}.navigation-questions-list{padding:.5rem 1rem;display:flex;flex-direction:column;position:absolute;top:calc(100% - 1rem);left:0;z-index:1;opacity:0;transform:scale(.5,0);transform-origin:center top;transition:opacity .1s,transform .2s ease-out;background-color:#fff;box-shadow:0 0 0 1px var(--color-secondary),0 2px 4px -1px var(--color-text)}.navigation.open .navigation-questions-list{opacity:1;transform:none}.navigation.no-motion .navigation-questions-list{transition:none}@media (min-width:60em){.navigation-questions-list{padding:0;flex-direction:row;position:static;opacity:1;transform:none;transition:none;background-color:transparent;box-shadow:none}.navigation-questions-list li{margin:0}}.navigation-questions-anchor{visibility:hidden}.navigation.open .navigation-questions-anchor{visibility:visible}@media (min-width:60em){.navigation-questions-anchor{visibility:visible}}.navigation-item-emoji{width:100%;font-size:1rem;line-height:1rem;padding-bottom:1.5rem;margin-bottom:1.5rem;vertical-align:top;align-content:flex-start;border-bottom:1px solid #efefef}.navigation-item-home{border-bottom:none;padding-bottom:0;font-weight:600}@media (min-width:60em){.navigation-item-emoji{width:50%;margin-bottom:2rem;border-bottom:1px solid #efefef}}.navigation-item-emoji em{font-style:normal;margin-right:.5rem}.navigation-item-translations{text-align:left}@media (min-width:60em){.navigation-item-translations{text-align:right}}.navigation-item-home em{color:#835eff}.navigation-item-emoji a{text-decoration:none;display:inline-block;vertical-align:middle}@media (min-width:60em){.navigation-item:not(:last-of-type){margin-right:.8rem}}.navigation-anchor[rel~=external]::after{content:' ➚';color:var(--color-highlight)}.navigation-anchor.current{border-bottom:2px solid var(--color-highlight);padding:0 0 5px 0}.topbar{width:100%;height:.18rem;background:var(--color-gradient)}.skip-link{position:absolute;top:0;left:0;padding:.5rem 1rem;background-color:var(--color-primary);color:#fff;text-decoration:none;transform:translateY(-100%)}.skip-link:focus{transform:none}.header{margin-bottom:2rem}.header-big-title{font-size:2.3rem;line-height:1.06;margin:1.4rem 0 .7rem;color:var(--color-primary);word-break:break-word}.rtl .header-big-title{text-align:right}@media (min-width:30em){.header-big-title{margin:1.4rem 0 .7rem;font-size:4.6rem}}@media (min-width:60em){.header-big-title{margin:2.1rem 0 .7rem;font-size:5.4rem}}@supports (mix-blend-mode:lighten){.header-big-title{display:inline-block;position:relative;color:#000;background:#fff;mix-blend-mode:multiply}.header-big-title::before{content:'';display:block;position:absolute;top:0;right:0;bottom:0;left:0;background-image:url('https://h5bp.github.io/Front-end-Developer-Interview-Questions/assets/images/gradient.svg');background-size:cover;pointer-events:none}.header-big-title::before{mix-blend-mode:screen}}.header-heading{font-size:2.3rem;text-transform:uppercase}.header-big-description{font-size:1.2rem;line-height:1.4;padding:1rem 0}@media (min-width:30em){.header-big-description{font-size:1.5rem}}@media (min-width:60em){.header-big-description{font-size:1.8rem}}.header-description{padding-top:1rem}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-family-body);font-weight:400;font-size:1.2rem;line-height:2;color:var(--color-text)}section+section{padding-top:2rem}h1,h2,h3,h4,h5,h6{font-family:var(--font-family-heading);color:var(--color-heading);font-style:normal;line-height:1.2;font-weight:600}section+section{padding-top:2rem}a{color:inherit;text-decoration:none;color:var(--color-secondary);transition:color ease-out var(--transition-duration)}a.current,a:focus:not(.skip-link),a:hover:not(.skip-link){color:var(--color-primary)}a:not(.navigation-anchor)[rel~=external]:after{content:' ➚'}ul:not(.navigation):not(.inline-list){list-style:none}ul:not(.navigation):not(.inline-list) li::before{content:"\25A0";color:var(--color-primary);font-weight:700;display:inline-block;width:1em;margin-left:-1em}.rtl ul:not(.navigation):not(.inline-list) li::before{margin-right:-1em;margin-left:initial}li{margin-bottom:.6rem}b,strong{font-weight:600}time{display:inline-block;color:var(--color-gray-70)}[tabindex='-1']{outline:0}img,svg{vertical-align:middle}img{display:block;max-width:100%;border-radius:var(--border-radius-default)}code{font-family:var(--font-family-code);color:var(--color-code);font-style:normal;font-size:1rem}blockquote:not([class]){padding-left:1rem;margin-left:-1rem;border-left:2px solid var(--color-primary);color:var(--color-gray-70);font-style:italic}code[class*=language-],pre[class*=language-]{font-size:.9rem;font-style:normal}p+pre[class*=language-]{margin-bottom:1.8rem}mark{color:var(--color-highlight);background-color:transparent}dt{font-weight:700}dd+dt{padding-top:.5rem}abbr[title],acronym[title]{background:var(--color-gray-opacity);border:1px solid var(--color-gray-opacity);cursor:help}.container{max-width:66rem;padding:1.5rem 2rem 2rem;margin-right:auto;margin-left:auto}@media (min-width:30rem){.container{padding:3rem 4rem 4rem}}.content li:not(:last-of-type){margin-bottom:1.2rem}.content h2{max-width:33rem}.content>:not(:last-child){margin-bottom:2rem}.content :not(hr)+h2,.content :not(hr)+h3{padding-top:1rem}.content ol:not(.inline-list),.content ul:not(.inline-list){padding-left:1.2rem}.content-simple li:not(:last-of-type){margin-bottom:.5rem}.content-edit{text-align:right;margin-top:2rem}.inline-list{padding:0;list-style:none;display:flex;flex-wrap:wrap}.inline-list li{padding:0 5px;display:inline-block;vertical-align:middle;text-align:center}.inline-list li::before{content:'';margin-left:0}.inline-list li img{display:block;margin:auto;margin-bottom:.6rem}.inline-list li a{display:inline-block;vertical-align:middle;margin:0 .15rem}.inline-list-contributors li a,.inline-list-original li a{font-size:1rem}.avatar{max-width:12rem}hr{border:none;bacground:none;border-bottom:1px solid #efefef}.footer{padding-top:3rem}.footer-text{font-size:.8rem}</style></head><body class=""><div class="topbar"></div><div class="container"><a class="skip-link" href="#main-content">Skip to main content</a><nav class="nav"><ul class="navigation" id="navigation"><li class="navigation-item-emoji navigation-item-home"><a class="navigation-anchor" href="/Front-end-Developer-Interview-Questions/" title="Home"><em></em><span>Front-end Developer Interview Questions</span></a></li><li class="navigation-item-emoji navigation-item-translations"><a class="navigation-anchor" href="/Front-end-Developer-Interview-Questions/translations" title="Translations"><em>🌐</em><span>Translations</span></a></li><li class="navigation-item navigation-questions-label"><button class="navigation-toggle" id="navigation-toggle">Questions:</button></li><li class="navigation-item navigation-questions"><ul class="navigation navigation-questions-list"><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/general-questions/" title="General Questions">General</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/html-questions/" title="HTML Questions">HTML</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/css-questions/" title="CSS Questions">CSS</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/javascript-questions/" title="JavaScript Questions">JavaScript</a></li><li class="navigation-item"><a rel="external noreferrer noopener" target="_blank" class="navigation-anchor navigation-questions-anchor" href="https://scottaohara.github.io/accessibility_interview_questions/" title="Accessibility Questions (external link)">A11y</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/testing-questions/" title="Testing Questions">Testing</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/performance-questions/" title="Performance Questions">Performance</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/network-questions/" title="Network Questions">Network</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/coding-questions/" title="Coding Questions">Coding</a></li><li class="navigation-item"><a class="navigation-anchor navigation-questions-anchor" href="/Front-end-Developer-Interview-Questions/questions/fun-questions/" title="Fun Questions">Fun</a></li></ul></li></ul></nav><main id="main-content" tabindex="-1"><header class="header"><h1 class="header-big-title">Front End Developer Interview Questions</h1></header><div class="content"><h2 id="table-of-contents" tabindex="-1"><a class="header-anchor" href="#table-of-contents"></a> <a name="toc">Table of Contents</a></h2><ol><li><a href="#general">General Questions</a></li><li><a href="#html">HTML Questions</a></li><li><a href="#css">CSS Questions</a></li><li><a href="#js">JS Questions</a></li><li><a href="#testing">Testing Questions</a></li><li><a href="#performance">Performance Questions</a></li><li><a href="#network">Network Questions</a></li><li><a href="#fun">Fun Questions</a></li></ol><h4><a href="#toc">[⬆]</a> <a name="general">General Questions:</a></h4><ul><li>What did you learn yesterday/this week?</li><li>What excites or interests you about coding?</li><li>What is a recent technical challenge you experienced and how did you solve it?</li><li>When building a new web site or maintaining one, can you explain some techniques you have used to increase performance?</li><li>Can you describe some SEO best practices or techniques you have used lately?</li><li>Can you explain any common techniques or recent issues solved in regards to front-end security?</li><li>What actions have you personally taken on recent projects to increase maintainability of your code?</li><li>Talk about your preferred development environment.</li><li>Which version control systems are you familiar with?</li><li>Can you describe your workflow when you create a web page?</li><li>If you have 5 different stylesheets, how would you best integrate them into the site?</li><li>Can you describe the difference between progressive enhancement and graceful degradation?</li><li>How would you optimize a websites assets/resources?</li><li>How many resources will a browser download from a given domain at a time?<ul><li>What are the exceptions?</li></ul></li><li>Name 3 ways to decrease page load (perceived or actual load time).</li><li>If you jumped on a project and they used tabs and you used spaces, what would you do?</li><li>Describe how you would create a simple slideshow page.</li><li>If you could master one technology this year, what would it be?</li><li>Explain the importance of standards and standards bodies.</li><li>What is Flash of Unstyled Content? How do you avoid FOUC?</li><li>Explain what ARIA and screenreaders are, and how to make a website accessible.</li><li>Explain some of the pros and cons for CSS animations versus JavaScript animations.</li><li>What does CORS stand for and what issue does it address?</li><li>How did you handle a disagreement with your boss or your collaborator?</li><li>What resources do you use to learn about the latest in front end development and design?</li><li>What skills are needed to be a good front-end developer?</li><li>What role do you see yourself in?</li><li>Explain the difference between cookies, session storage, and local storage?</li><li>Can you explain what happens when you enter a URL into the browser?</li><li>Describe the difference between SSR and CSR. Discuss the pros and cons.<ul><li>Are you familiar with static rendering?</li><li>Rehydration?</li></ul></li></ul><h4><a href="#toc">[⬆]</a> <a name="html">HTML Questions:</a></h4><ul><li>What does a <code>doctype</code> do?</li><li>How do you serve a page with content in multiple languages?</li><li>What kind of things must you be wary of when designing or developing for multilingual sites?</li><li>What are <code>data-</code> attributes good for?</li><li>Consider HTML5 as an open web platform. What are the building blocks of HTML5?</li><li>Describe the difference between a <code>cookie</code>, <code>sessionStorage</code> and <code>localStorage</code>.</li><li>Describe the difference between <code>&lt;script&gt;</code>, <code>&lt;script async&gt;</code> and <code>&lt;script defer&gt;</code>.</li><li>Why is it generally a good idea to position CSS <code>&lt;link&gt;</code>s between <code>&lt;head&gt;&lt;/head&gt;</code> and JS <code>&lt;script&gt;</code>s just before <code>&lt;/body&gt;</code>? Do you know any exceptions?</li><li>What is progressive rendering?</li><li>Why you would use a <code>srcset</code> attribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute.</li><li>Have you used different HTML templating languages before?</li><li>What is the difference between <code>canvas</code> and <code>svg</code>?</li><li>What are empty elements in HTML ?</li></ul><h4><a href="#toc">[⬆]</a> <a name="css">CSS Questions:</a></h4><ul><li>What is CSS selector specificity and how does it work?</li><li>What is the difference between “resetting” and “normalizing” CSS? Which would you choose, and why?</li><li>Describe Floats and how they work.</li><li>Describe z-index and how stacking context is formed.</li><li>Describe BFC (Block Formatting Context) and how it works.</li><li>What are the various clearing techniques and which is appropriate for what context?</li><li>How would you approach fixing browser-specific styling issues?</li><li>How do you serve your pages for feature-constrained browsers?<ul><li>What techniques/processes do you use?</li></ul></li><li>What are the different ways to visually hide content (and make it available only for screen readers)?</li><li>Have you ever used a grid system, and if so, what do you prefer?</li><li>Have you used or implemented media queries or mobile specific layouts/CSS?</li><li>Are you familiar with styling SVG?</li><li>Can you give an example of an <code>@media</code> property other than <code>screen</code>?</li><li>What are some of the “gotchas” for writing efficient CSS?</li><li>What are the advantages/disadvantages of using CSS preprocessors?<ul><li>Describe what you like and dislike about the CSS preprocessors you have used.</li></ul></li><li>How would you implement a web design comp that uses non-standard fonts?</li><li>Explain how a browser determines what elements match a CSS selector.</li><li>Describe pseudo-elements and discuss what they are used for.</li><li>Explain your understanding of the box model and how you would tell the browser in CSS to render your layout in different box models.</li><li>What does <code>* { box-sizing: border-box; }</code> do? What are its advantages?</li><li>What is the CSS <code>display</code> property and can you give a few examples of its use?</li><li>What is the difference between inline and inline-block?</li><li>What is the difference between the “nth-of-type()” and “nth-child()” selectors?</li><li>What is the difference between a relative, fixed, absolute and statically positioned element?</li><li>What existing CSS frameworks have you used locally, or in production? How would you change/improve them?</li><li>Have you used CSS Grid?</li><li>Can you explain the difference between coding a web site to be responsive versus using a mobile-first strategy?</li><li>Have you ever worked with retina graphics? If so, when and what techniques did you use?</li><li>Is there any reason youd want to use <code>translate()</code> instead of <em>absolute positioning</em>, or vice-versa? And why?</li><li>How is clearfix css property useful?</li><li>Can you explain the difference between px, em and rem as they relate to font sizing?</li><li>Can you give an example of a pseudo class? Can you provide an example use case for a pseudo class?</li><li>What is the difference between a block level element and an inline element. Can you provide examples of each type of element?</li><li>What is the difference between CSS Grid and Flexbox? When would you use one over the other?</li><li>What is the difference between fixed, fluid and responsive layouts?</li></ul><h4><a href="#toc">[⬆]</a> <a name="js">JS Questions:</a></h4><ul><li>Explain event delegation.</li><li>Explain how <code>this</code> works in JavaScript.<ul><li>Can you give an example of one of the ways that working with <code>this</code> has changed in ES6?</li></ul></li><li>Explain how prototypal inheritance works.</li><li>What is the difference between a variable that is: <code>null</code>, <code>undefined</code> or undeclared?<ul><li>How would you go about checking for any of these states?</li></ul></li><li>What is a closure, and how/why would you use one?</li><li>What language constructions do you use for iterating over object properties and array items?</li><li>Can you describe the main difference between the <code>Array.forEach()</code> loop and <code>Array.map()</code> methods and why you would pick one versus the other?</li><li>What is a typical use case for anonymous functions?</li><li>What is the difference between host objects and native objects?</li><li>Explain the difference between: <code>function Person(){}</code>, <code>var person = Person()</code>, and <code>var person = new Person()</code>?</li><li>Explain the differences on the usage of <code>foo</code> between <code>function foo() {}</code> and <code>var foo = function() {}</code></li><li>Can you explain what <code>Function.call</code> and <code>Function.apply</code> do? What is the notable difference between the two?</li><li>Explain <code>Function.prototype.bind</code>.</li><li>What is the difference between feature detection, feature inference, and using the UA string?</li><li>Explain “hoisting”.</li><li>What is type coercion? What are common pitfalls of relying on type coercion in JavaScript code?</li><li>Describe event bubbling.</li><li>Describe event capturing.</li><li>What is the difference between an “attribute” and a “property”?</li><li>What are the pros and cons of extending built-in JavaScript objects?</li><li>What is the difference between <code>==</code> and <code>===</code>?</li><li>Explain the same-origin policy with regards to JavaScript.</li><li>Why is it called a Ternary operator, what does the word “Ternary” indicate?</li><li>What is strict mode? What are some of the advantages/disadvantages of using it?</li><li>What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?</li><li>What tools and techniques do you use debugging JavaScript code?</li><li>Explain the difference between mutable and immutable objects.<ul><li>What is an example of an immutable object in JavaScript?</li><li>What are the pros and cons of immutability?</li><li>How can you achieve immutability in your own code?</li></ul></li><li>Explain the difference between synchronous and asynchronous functions.</li><li>What is event loop?<ul><li>What is the difference between call stack and task queue?</li></ul></li><li>What are the differences between variables created using <code>let</code>, <code>var</code> or <code>const</code>?</li><li>What are the differences between ES6 class and ES5 function constructors?</li><li>Can you offer a use case for the new arrow <code>=&gt;</code> function syntax? How does this new syntax differ from other functions?</li><li>What advantage is there for using the arrow syntax for a method in a constructor?</li><li>What is the definition of a higher-order function?</li><li>Can you give an example for destructuring an object or an array?</li><li>Can you give an example of generating a string with ES6 Template Literals?</li><li>Can you give an example of a curry function and why this syntax offers an advantage?</li><li>What are the benefits of using <code>spread syntax</code> and how is it different from <code>rest syntax</code>?</li><li>How can you share code between files?</li><li>Why you might want to create static class members?</li><li>What is the difference between <code>while</code> and <code>do-while</code> loops in JavaScript?</li><li>What is a promise? Where and how would you use promise?</li><li>Discuss how you might use Object Oriented Programming principles when coding with JavaScript.</li></ul><h4><a href="#toc">[⬆]</a> <a name="code-questions">Coding Questions:</a></h4><ul><li>Make this work:</li></ul><pre class="language-javascript"><code class="language-javascript"><span class="token function">duplicate</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token number">4</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// [1,2,3,4,5,1,2,3,4,5]</span></code></pre><ul><li>Create a for loop that iterates up to <code>100</code> while outputting <strong>“fizz”</strong> at multiples of <code>3</code>, <strong>“buzz”</strong> at multiples of <code>5</code> and <strong>“fizzbuzz”</strong> at multiples of <code>3</code> and <code>5</code></li><li>What will be returned by each of these?</li></ul><pre class="language-javascript"><code class="language-javascript">console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"hello"</span> <span class="token operator">||</span> <span class="token string">"world"</span><span class="token punctuation">)</span>
console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"foo"</span> <span class="token operator">&amp;&amp;</span> <span class="token string">"bar"</span><span class="token punctuation">)</span></code></pre><ul><li>Write an immediately invoked function expression (IIFE)</li></ul><h4><a href="#toc">[⬆]</a> <a name="testing">Testing Questions:</a></h4><ul><li>What are some advantages/disadvantages to testing your code?</li><li>What tools would you use to test your codes functionality?</li><li>What is the difference between a unit test and a functional/integration test?</li><li>What is the purpose of a code style linting tool?</li><li>What are some of the testing best practices?</li></ul><h4><a href="#toc">[⬆]</a> <a name="performance">Performance Questions:</a></h4><ul><li>What tools would you use to find a performance bug in your code?</li><li>What are some ways you may improve your websites scrolling performance?</li><li>Explain the difference between layout, painting and compositing.</li></ul><h4><a href="#toc">[⬆]</a> <a name="network">Network Questions:</a></h4><ul><li>Traditionally, why has it been better to serve site assets from multiple domains?</li><li>Do your best to describe the process from the time you type in a websites URL to it finishing loading on your screen.</li><li>What are the differences between Long-Polling, Websockets and Server-Sent Events?</li><li>Explain the following request and response headers:<ul><li>Diff. between Expires, Date, Age and If-Modified-…</li><li>Do Not Track</li><li>Cache-Control</li><li>Transfer-Encoding</li><li>ETag</li><li>X-Frame-Options</li></ul></li><li>What are HTTP methods? List all HTTP methods that you know, and explain them.</li><li>What is domain pre-fetching and how does it help with performance?</li><li>What is a CDN and what is the benefit of using one?</li></ul><h4><a href="#toc">[⬆]</a> <a name="fun">Fun Questions:</a></h4><ul><li>What is a cool project that youve recently worked on?</li><li>What are some things you like about the developer tools you use?</li><li>Who inspires you in the front-end community?</li><li>Do you have any pet projects? What kind?</li></ul></div><div class="content-edit"><a rel="external noreferrer noopener" target="_blank" href="https://github.com/h5bp/Front-end-Developer-Interview-Questions/tree/master/src/translations/************.md">Edit this page</a></div></main><footer class="footer"><p class="footer-text">Copyright &copy; 2012 - 2024. Contributors to <a href="https://github.com/h5bp/Front-end-Developer-Interview-Questions/blob/main/CONTRIBUTORS.md">Front-end-Developer-Interview-Questions.</a><br>Curious about the project? <a href="/Front-end-Developer-Interview-Questions/about/">Read more about here</a>.</p></footer></div><script>console.log("%cA black belt is a white belt that didn't quit.","color: #fff; font-size: 20px; text-shadow: 1px 1px 1px #000; font-family: serif;");var navToggle=document.getElementById("navigation-toggle"),nav=document.getElementById("navigation");navToggle.addEventListener("click",function(){nav.classList.toggle("open")}),window.addEventListener("resize",function(){document.width>960?nav.classList.remove("active"):(nav.classList.add("no-motion"),setTimeout(function(){nav.classList.remove("no-motion")},250))});</script></body></html>