Junior Front End Developer Interview Questions
Junior Front End Developer Interview Questions
• What has been the most dif cult problem you have ever had to solve
• What tags would you use to make text bold or italic using HTML
• When would you use RGBA instead of a hex value for a color
• How would you write a function that takes in two numbers and multiplies them
without using the multiplication sign
• How would you handle a situation where a client asks for something that is out of
scope
HTML/CSS
1. In the context of CSS styling can you explain what does display-style:
inline-block stand for?
2. If you have a <ul> element with several <li> elements, how would you go
about setting up these elements in a row by using HTML and CSS?
3. In CSS styling when would you use floats? How do they work?
5. What is Bootstrap? When would you use it? How does its grid system work?
6. Explain the notion of responsive design and how it works? Use an example if
you like.
?
fi
?
fi
?
JavaScript
1. What is ECMAScript?
12. What is the difference between GET and POST when specifying an AJAX
request?
Software/Tooling
1. Have you worked with Photoshop as a front end developer? For what purpose?
2. What software versioning system have you used? Could you describe how a
work ow would look like in this system?
About You
1. What was the hardest project you ever worked on? Why was it dif cult? If it is
an application/algorithm can you explain how it works?
fl
fi
2. How do you stay up to date with technology news?
4. Are there any languages or frameworks that you would like to learn in the
future? How would you go about teaching yourself? Why did you pick those
languages/frameworks?
5. What are the most important skills and qualities that a junior front end
developer should have?
•
Meta tags always go inside head tag of the HTML pag
•
Meta tags is always passed as name/value pair
•
Meta tags are not displayed on the page but intended for the browse
•
Meta tags can contain information about character
encoding, description, title of the document etc
Example
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="I am a web page with
description">
<title>Home Page</title>
</head>
<body>
</body>
</html>
UX Design 78
Answer
• LINE – The linear marks made with a pen or brush or the edge created
when two shapes meet
• SHAPE – A shape is a self contained de ned area of geometric
(squares and circles), or organic (free formed shapes or natural
shapes). A positive shape automatically creates a negative shape
• DIRECTION – All lines have direction – Horizontal, Vertical or Oblique.
Horizontal suggests calmness, stability and tranquillity. Vertical gives a
feeling of balance, formality and alertness. Oblique suggests movement
and actio
• SIZE – Size is simply the relationship of the area occupied by one
shape to that of another
• TEXTURE – Texture is the surface quality of a shape – rough, smooth,
soft hard glossy etc
• COLOUR – Colour is light re ected off objects. Color has three main
characteristics: hue or its name (red, green, blue, etc.), value (how light
or dark it is), and intensity (how bright or dull it is)
Software Architecture 70
Answer
fl
fi
.
order ensuring all machines get equal number of requests and no single
machine is overloaded or underloaded
•
Optimize resource usage (avoid overload and under-load of any
machines
• Achieve Maximum Throughpu
• Minimize response tim
Most common load balancing techniques in web based applications are
1. Round robi
2. Session af nity or sticky sessio
3. IP Address af nit
[Link] 88
Answer
fi
n
fi
y
Web Security 58
Answer
SQL injection is one of the most common types of injection attack. To carry it
out, an attacker provides malicious SQL statements through the application
How to prevent
JavaScript 142
Answer
A variable name has to be unique within the same scope. A scope can be
nested inside another scope. If one scope is nested inside another, code
inside the innermost scope can access variables from either scope
[Link] 88
Answer
npm stands for Node Package Manager. npm provides following two main
functionalities
Webpack 32
Answer
Webpack is a build tool that puts all of your assets, including Javascript,
images, fonts, and CSS, in a dependency graph. Webpack lets you
use require() in your source code to point to local les, like images, and
decide how they're processed in your nal Javascript bundle, like replacing
the path with a URL pointing to a CDN
fi
.
fi
.
Webpack 32
Answer
If you're building a complex Front End application with many non-code static
assets such as CSS, images, fonts, etc, then yes, Webpack will give you
great bene ts
If your application is fairly small, and you don't have many static assets and
you only need to build one Javascript le to serve to the client, then Webpack
might be more overhead than you need
MongoDB 83
Answer
SQL databases store data in form of tables, rows, columns and records. This
data is stored in a pre-de ned data model which is not very much exible for
today's real-world highly growing applications. MongoDB in contrast uses a
exible structure which can be easily modi ed and extended
CSS 50
fl
fi
.
fi
fi
.
fi
.
fl
Answer
The CSS box model is a rectangular layout paradigm for HTML elements that
consists of the following
• Content - The content of the box, where text and images appea
• Padding - A transparent area surrounding the content (i.e., the amount
of space between the border and the content
• Border - A border surrounding the padding (if any) and conten
• Margin - A transparent area surrounding the border (i.e., the amount of
space between the border and any neighboring elements
API Design 46
Answer
fi
.
Content Security Policy (CSP) is an HTTP header that allows site operators
ne-grained control over where resources on their site can be loaded from.
The use of this header is the best method to prevent cross-site scripting
(XSS) vulnerabilities. Due to the dif culty in retro tting CSP into existing
websites, CSP is mandatory for all new websites and is strongly
recommended for all existing high-risk sites
The primary bene t of CSP comes from disabling the use of unsafe inline
JavaScript. Inline JavaScript – either re ected or stored – means that
improperly escaped user-inputs can generate code that is interpreted by the
web browser as JavaScript. By using CSP to disable inline JavaScript, you
can effectively eliminate almost all XSS attacks against your site
fi
fi
.
fi
fl
.
fi
.
Web Security 58
Answer
React 155
Answer
CSS 50
Answer
fl
fl
.
UX Design 78
Answer
JavaScript 142
Answer
// Non-strict code...
(function(){
"use strict";
// Non-strict code...
CSS 50
Answer
Web browsers apply CSS rules to a document to affect how they are
displayed. A CSS rule is formed from
• A set of properties, which have values set to update how the HTML
content is displayed
• A selector, which selects the element(s) you want to apply the updated
property values to
A set of CSS rules contained within a stylesheet determines how a webpage
should look
OOP 54
Answer
Software Architecture 70
Answer
OOP 54
Answer
fi
.
HTML5 55
Answer
jQuery 51
Answe
[Link] 88
Answer
When Node gets I/O request it creates or uses a thread to perform that I/O
operation and once the operation is done, it pushes the result to the event
queue. On each such event, event loop runs and checks the queue and if
the execution stack of Node is empty then it adds the queue result to
execution stack
API Design 46
Answer
PUT puts a le or resource at a particular URI and exactly at that URI. If there
is already a le or resource at that URI, PUT changes that le or resource. If
there is no resource or le there, PUT makes on
POST sends data to a particular URI and expects the resource at that URI to
deal with the request. The web server at this point can decide what to do with
the data in the context of speci ed resourc
PUT is idempotent meaning, invoking it any number of times will not have an
impact on resources
fi
fi
.
fi
fi
.
fi
.
UX Design 78
Answer
HTML5 55
Answer
The defer attribute downloads the script while the document is still parsing
but waits until the document has nished parsing before executing it,
equivalent to executing inside a DOMContentLoaded event
listener. defer scripts will execute in order
The async attribute downloads the script during parsing the document but will
pause the parser to execute the script before it has fully nished
parsing. async scripts will not necessarily execute in order
Note: both attributes must only be used if the script has a src attribute (i.e.
not an inline script)
<script src="[Link]"></script>
<script src="[Link]" defer></script>
<script src="[Link]" async></script>
Software Architecture 70
fi
.
fi
.
fi
Answer
Web Security 58
Answer
ClickJacking is an attack that fools users into thinking they are clicking on
one thing when they are actually clicking on another. The attack is possible
thanks to HTML frames (iframes)
Its other name, user interface (UI) redressing, better describes what is going
on. Users think they are using a web page’s normal UI, but in fact there is a
fi
fi
.
fi
.
hidden UI in control; in other words, the UI has been redressed. When users
click something they think is safe, the hidden UI performs a different action
JavaScript 142
Answer
var a = "42";
var b = Number( a );
a; // "42"
b; // 42 -- the number!
And here's an example of implicit coercion
var a = "42";
a; // "42"
b; // 42 -- the number!
JavaScript 142
Answer
(function IIFE(){
[Link]( "Hello!" );
})();
// "Hello!"
This pattern is often used when trying to avoid polluting the global
namespace, because all the variables used inside the IIFE (like in any other
normal function) are not visible outside its scope
CSS 50
Answer
• Simple Gri
• Pur
• Flexbox Gri
• Bootstra
• Foundatio
Mid
CSS 50
Answer
A Mixin is a block of code that lets us group CSS declarations we may reuse
throughout our site
To de ne mixin
/*scss*/
.row {
@include grid(true);
}
/*css*/
.row {
display: -webkit-flex;
display: flex;
}
HTML5 55
Answer
fi
:
New Doctype
<!DOCTYPE html>
New Structure
• <input type="datetime">
• <input type="datetime-local">
• <input type="date">
• <input type="month">
• <input type="week">
• <input type="time">
• <input type="number">
• <input type="range">
fi
e
fi
fi
fi
fi
fi
.
fi
fi
e
fi
e
• <input type="email">
• <input type="url">
New Elements
You possibly still add the type attribute to your link and script tags
The new browsers have a nifty new attribute that can be applied to elements,
called contenteditable. As the name implies, this allows the user to edit any
of the text contained within the element, including its children. There are a
variety of uses for something like this, including an app as simple as a to-do
list, which also takes advantage of local storage
fl
.
CSS 50
Answer
jQuery 51
Answer
fi
fi
d
and dif cult to maintain when size of project increases - Sometimes you
have to write more code to achieve the same functionality as in Angular
• What you should include to change site thumbnail when sharing on social
media
• What is defer and async attribute in script element and what's the
difference
You should know how to build common UI elements such as a Modal or Multi-level
Navigation, how to implement CSS Animations and use Flexbox and CSS Grid
fi
?
fi
.
In commercial projects you will rarely see a plain CSS les. Learn about are CSS
preprocessors such as SCSS, BEM methodology and CSS-in-JS
• What are the good practices of CSS Animations? What you should avoid and
why
• What values of display property you know? What are the differences
During job interview you should expect questions about DOM manipulation, using
the most common array methods and many others parts of JavaScript. It's hard to
list all of them. In the end you should be able to understand code written in
JavaScript and write simple features. I would recommend you to take a look
at Functional Programming in Javascript Series from Fun Fun Function channel on
Youtube and free JavaScript Algorithms And Data Structures course on
freeCodeCamp. After you complete it you should be able to answer most of the
questions related to JavaScript
• Use lter array method to remove every odd number from given array
What you should know about JavaScript Framework such as React, Angular
or Vu
The most common way to test your framework knowledge will be a task to complete
before the interview. You should know how to interact with external REST APIs,
?
fi
e
fi
?
manage and send form data, implement simple UI elements such as a modal,
dropdown, tabs or slider
It's good to know code testing techniques so you can at least talk about them
• Create application, which fetches list of movies from API, can sort them and
display movie details on a separate page (task before interview
It is very important to have good soft skills when applying for a job. Developing
apps is almost always done as a team. During interview you should present
yourself as a person which is easy to communicate and work with
Be truly interested and engaged in a conversation. Try to explain and describe your
solutions. You will have much bigger chance to get hired if the interviewer will like
you
Before the interview look for information about the company you are applying for
and try to use it during the conversation
is a good idea for your rst bigger project. Do not worry about design, there
are many resources available online
Requirements
Nice to haves
• add a slide
Requirements
• welcome screen with name and symbol input for each playe
Nice to haves
• playing with the computer, using ex. minmax algorithm or your own solutio
fi
.
A simple app where you can share location with your friend can be both a
demanding project and a very useful tool you can use. In this project, you will use
JavaScript to interact with external services for maps (ex. Google Maps or
OpenStreetMap)
Requirements
Nice to haves
• sharing your realtime location, you will have to save it and read it every few
seconds from an external database (ex. Firebase
• displaying the realtime location of your friend when he accesses the pag
This project will help every TV Series fan, track premieres of new episodes. It will
be a great opportunity to use a JavaScript framework you are comfortable with
:
Requirements:
•displaying tracked TV
Series list along with
newest episode
premiere dat
Nice to haves
Creating a home budget App will be an ultimate check for your skills as a Junior
Front-end Developer. It will check your ability to create forms and store information,
but it can also help you save money
Requirements
• adding a categor
Nice to haves
fi
!
Summar
Side projects are a great way to show your skills to land rst job as Junior Front-
end Developer. Let your potential employer know what did you build so far. They
will not only look at the webpage but also analyze your code, so make sure it's
clean
Before you start building something new create a list of requirements for MVP
(Minimum Valuable Product). During development, you will discover more
interesting functionalities your application can have, just add it as a nice to have to
the list. It will help you nish the project on schedule
• Very good understanding of JavaScript – that one is quite obvious. Aside of the
language itself, you should be familiar with static code analysis tools
• English – you should be able to communicate uently and make your points
clearly
• Browsers – practical knowledge of browsers, how they work and how to debug
your code in the browser
fi
:
fi
.
fl
.
fi
fi
.
• Do you use CSS preprocessors? What are their pros and cons
• Explain the difference between Flexbox and CSS Grid. When would you use
any of these? What are their strengths and weaknesses
• What is and why to use the Block Element Modi er (BEM) convention
• JavaScript: Explain how you can use JavaScript functions such as forEach,
Map, or Reduce.
• React: What are higher-order components (HOC) and how you can use them
in practice
• React: What do you think about the latest updates of React – go over the
bene ts and uses of React Hooks
CSS
1. When you do relative design you have different units of relativity like em, %, etc. One
of them is called em and another one rem. Can you tell me the difference between
these two?
EM are relative to the immediate parents while REM is only relative to the html (root) font-
size.
2. How do you position something to the bottom right page?
Let’s say we have a code like this:
The way this works is that absolutely positioned elements are always positioned with
respect to the first relatively positioned parent element, or the window. Because we set the
fi
.
fi
:
box’s position to relative, .box-text positions its right edge to the right edge of .box and its
bottom edge to the bottom edge of .box.
JavaScript
3. Besides callbacks what are other ways to handle asynchronous programming in JS?
Using Promises — standard way.
4. Speaking of Promises do you know what async-await is?
What is the difference between async/await and Promises?
None! Async/await is a different API to use promises. Async/Await provide a much nicer
syntax in more complex scenarios. In particular, anything dealing with loops or certain
other constructs like try/catch.
5. What are the two most popular Ajax libraries?
Axios and fetch.
React
6. React — When you want to make Ajax call, what hook would you normally use?
useEffect hook.
7. React — If you are rendering array of objects what would you normally pass with the
key proper? What is the best value to use?
Some unique id. The GUID from database or something.
8. React — Do you know what a Fragment is in React?
Multiple parts of the component needs to be wrapped with something to become a node.
Fragment is a wrapper around multiple components that then becomes a single node but it
doesn’t render anything to the DOM — it is an invisible wrapper.
9. React — Talking about Fragments, do you know why are Fragments better to use
than divs?
There are couple of reasons for that. Fragments are a bit faster and use less memory by not
creating an extra DOM node. But, this only has a real benefit on very large and deep trees.
Some CSS mechanisms like Flexbox and CSS Grid have a special parent-child
relationships, and adding divs in the middle makes it hard to keep the desired layout. Also,
The DOM Inspector is less cluttered.
HTTP
10. Let’s say your are making a API and you want to modify a resource, what HTTP
verb would you use?
PUT or PATCH.
This technical question is best suited to more junior front end developers and tests their
understanding of the CSS language. While the technical knowledge is important, it’s the
“why” that’s really important here. The candidate’s reason for using oats can help you
determine their approach to styling website—and whether or not they’re a good t for your
company
fl
fl
fi
• Candidates should be able to clearly and concisely describe what the CSS oat
property is and when it’s appropriate to use
• If they mention that they use oats to create their entire website layout, this may be
a sign that they’re following outdated practices
Ajax stands for asynchronous JavaScript and XML (although in modern usage, JSON may
be substituted for XML). Essentially, Ajax is a set of web development tools that enable
developers to change parts of a web page in the background without reloading the entire
page. It’s a good question to test candidates’ basic understanding of different web
programming languages and their depth of knowledge
• Listen for answers that mention advantages like improved interactivity and
maintaining Javascript variables and DOM state on a page
• Strong answers might also touch upon some of the disadvantages, such as the fact
that it’s more dif cult to bookmark dynamic pages
JavaScript templating is a simple and useful strategy used to separate HTML structures
from the JavaScript strings they contain. Since this strategy allows developers to be more
ef cient, all candidates should ideally have a few libraries that they regularly use and can
discuss con dently
fi
fi
fi
.
fl
.
fl
Front end developers should always have the end user in mind when developing a new
website or web application, so the best candidates will take the user experience (UX) very
seriously. What best practices have they applied to previous projects? Have they tested
assistive solutions to make sure the website or application is accessible to all potential
users
• Look for candidates who have rst-hand experience implementing usability and
accessibility standards
• Top answers may mention performing user testing across various devices, ensuring
the site or app worked seamlessly and intuitively no matter how a user engaged
with it
Users often have different preferences when it comes to browsers, so it’s important for
your company to provide the same exceptional experience, no matter how they choose to
access your website. Browser compatibility can be a pain to troubleshoot, so this question
can give you a real insight into a candidate’s patience
• Candidates should demonstrate that they’re dedicated to working through the kinks,
no matter how frustrating they may be
• A good response will show strong attention to detail and a passion for delivering the
best possible user experience to the website’s visitors
If you could master one technology this year, which would you
choose, and how would you go about doing it?
This question lets you test a candidate’s ambition and their willingness to learn. The
development landscape evolves fast, so these traits can help a candidate stay ahead of
the curve. Dig a little deeper by asking them why they chose that particular technology. Do
they think it will be relevant to their work? Do they want to bring more value to their
employer
fi
fi
.
fi
fi
.
• Strong answers might mention taking a boot camp in their spare time or following
forums and blogs that center around the technology
• Ideally, candidates will already be taking steps to master their chosen technology
What were the last questions you viewed on Stack Over ow? What
were the last questions you answered?
Stack Over ow is an invaluable resource for front end developers, allowing them to source
advice and answers to development questions from the wider tech community. This
question allows you to test how advanced a candidate’s skills are based on the level of
questions they’re viewing and answering—as well as their passion for their eld
• Look for signs that the candidate is actively engaged in the community at large and
willing to share their expertise with others
• If they mention that they’re always looking up answers to simple problems, they
might struggle with more complex challenges
fl
.
fl
fi
.