Fullstack interview questions Flashcards
Explain equality in JavaScript
Strict comparison (e.g., ===) checks for exact value equality including type
Abstract comparison (e.g. ==) checks for value equality ignoring the type
e.g.
1===’1’ //returns false
1==’1’ //returns true
Explain meta tags in HTML
- Contain information about character encoding, description, title of the document etc.
- Not displayed on the page but intended for the browser
- Always passed as name/value pairs
- Always go inside head tag of the HTML page
Explain the three main ways to apply CSS styles to a web page
- inline style
- style HTML tag
- external stylesheet
What is CSS?
CSS stands for Cascading Style Sheets. CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.
CSS was intended to allow web professionals to separate the content and structure of a website’s code from the visual design.
What is Git?
A version control system that tracks project progess
What is Node.js?
Node.js = Runtime Environment + JavaScript Library
What is SQL injection?
An attacker provides malicious SQL statements through the application. Injection attacks stem from a lack of strict separation between program instructions (i.e., code) and user-provided (or external) input.
What is Scope in JavaScript?
A collection of variables as well as the rules for how those variables are accessed by name. Only code inside that function can access that function’s scoped variables.
What is meant by Continuous Integration?
Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
What is npm?
Node Package Manager - online repositories for node.js packages/modules and Command line utility to install packages, do version management and dependency management
Describe floats and how they work
Float is a CSS positioning property. Floated elements remain a part of the flow of the web page. This is distinctly different than page elements that use absolute positioning, which are removed from the flow of the webpage.
Describe what User Interface (UI) Design does mean for you?
User Interface (UI) design is the design of software or websites with the focus on the user’s experience and interaction. Good design puts emphasis on goals and completing tasks, and good UI design never draws more attention to itself than enforcing user goals.
Explain Null and Undefined in JavaScript
undefined - something hasn’t been initialized
null - something is currently unavailable
[think difference between blank and n/a on a form]
Explain event bubbling and how one may prevent it
Event bubbling is when clicking on a child element one may exhibit the handler of the parent activating.
One way to prevent event bubbling is using event.stopPropagation() or event.cancelBubble on IE < 9.
Explain the CSS “box model” and the layout components that it consists of
Content - The content of the box, where text and images appear
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 content
Margin - A transparent area surrounding the border (i.e., the amount of space between the border and any neighboring elements)
Given a string, reverse each word in the sentence
function reverseBySeparator(string, separator) { return string.split(separator).reverse().join(separator); }
- string.split(separator)
- .reverse( )
- .join(separator)
Have you played around with the new CSS Flexbox or Grid specs?
Yes. Flexbox is mainly meant for 1-dimensional layouts while Grid is meant for 2-dimensional layouts.
Flexbox solves many common problems in CSS, such as vertical centering of elements within a container, sticky footer, etc. Bootstrap and Bulma are based on Flexbox, and it is probably the recommended way to create layouts these days. Have tried Flexbox before but ran into some browser incompatibility issues (Safari) in using flex-grow, and I had to rewrite my code using inline-blocks and math to calculate the widths in percentages, it wasn’t a nice experience.
Grid is by far the most intuitive approach for creating grid-based layouts (it better be!) but browser support is not wide at the moment.