Fullstack interview questions Flashcards
(44 cards)
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.
How Can I Get Indexed Better by Search Engines?
place the following two statements in the part of your documents:
Both may contain up to 1022 characters. If a keyword is used more than 7 times, the keywords tag will be ignored altogether. Also, you cannot put markup (other than entities) in the description or keywords list.
How does the Centralized Workflow work?
The Centralized Workflow uses a central repository to serve as the single point-of-entry for all changes to the project. The default development branch is called master and all changes are committed into this branch.
Developers start by cloning the central repository. In their own local copies of the project, they edit files and commit changes. These new commits are stored locally.
To publish changes to the official project, developers push their local master branch to the central repository. Before the developer can publish their feature, they need to fetch the updated central commits and rebase their changes on top of them.
Compared to other workflows, the Centralized Workflow has no defined pull request or forking patterns.
What does use strict do?
The use strict literal is entered at the top of a JavaScript program or at the top of a function and it helps you write safer JavaScript code by throwing an error if a global variable is created by mistake.
What existing CSS frameworks have you used locally, or in production? How would you change/improve them?
Bootstrap - Slow release cycle. Bootstrap 4 has been in alpha for almost 2 years. Add a spinner button component, as it is widely used.
What is Cross Site Scripting (XSS)?
By using Cross Site Scripting (XSS) technique, users executed malicious scripts (also called payloads) unintentionally by clicking on untrusted links and hence, these scripts pass cookies information to attackers.
What is DOM (Document Object Model) and how is it linked to CSS?
The Document Object Model (DOM) is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object representing a part of the document.
With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content. The DOM specifies interfaces which may be used to manage XML or HTML documents.
When a browser displays a document, it must combine the document’s content with its style information. The browser converts HTML and CSS into the DOM (Document Object Model). The DOM represents the document in the computer’s memory. It combines the document’s content with its style.
What is Sass?
Sass or Syntactically Awesome StyleSheets is a CSS preprocessor that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized, and get small stylesheets up and running quickly.
A CSS preprocessor is a scripting language that extends CSS by allowing developers to write code in one language and then compile it into CSS.