Shared Flashcard Set

Details

Interview Questions
Interview Questions
40
Other
Not Applicable
05/24/2019

Additional Other Flashcards

 


 

Cards

Term

CSS

 

What are media queries?

Definition
  • @media
  • rules to include a block of CSS properties only if certain conditions are met such as screen size, window size, and screen orientation
Term

CSS / HTML

 

What is the difference between id and class?

Definition

id can be used to identify one element

 

class can be used to identify more than one element

Term

EXPRESS

 

How do you set up a basic web server with express?

Definition
  1. create the project's directory
  2. set up the package.json (npm install)
  3. set up the server.js, routes and models
  4. set up the index.html in the client folder
Term

HTML, CSS, JAVASCRIPT

 

Describe the purpose of HTML, CSS, and JavaScript on a webpage?

Definition

HTML is the bones (what everything is built around)

CSS is the skin (what makes the aesthetics)

JavaScript is the muscle (make makes it all do stuff)

Term

HTTP Methods

 

What is a GET request and a POST request?

Definition

GET fetches info from the database

 

POST adds info to the database

 

DELETE removed info from the database

 

PUT updates or modifies info in the database

Term

JAVASCRIPT

 

Is "false" === false?

Definition
no, "false" is a string and not the same type as false
Term

JAVASCRIPT

 

What are promises and why do we use them?

Definition

What they are

  • it is a proxy for a value that we may or may not yet know yet when the promise is created
  • a promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value

Why we use them

  • it allows you to associate handlers with an asynchronous action's eventual value or failure
  • promises help us avoid nested callback hell
  • they are easier to read and debug
Term

JAVASCRIPT

 

What are the states of a promise?

Definition

pending

initial sate, neither fulfilled nor rejected

 

fullfilled

the operation completed successfully

 

rejected

the operation failed

Term

JAVASCRIPT

 

What can you do to avoid callback hell in ES6?

Definition
use promises
Term

JAVASCRIPT

 

What is a JavaScript constructor?

Definition
A JavaScript constructor is used to create an Object and acts as a sort of template for the object using prototypes that show what the attributes should be like and what methods it should have
Term

JAVASCRIPT

 

What is closure and how do you use it?

 

Definition

What it is

  • When a function returns another function its environment is held in a closure

How it is used

  • a closure is used to nest functional steps
Term

JAVASCRIPT

 

What is event bubbling in the DOM?

Definition

one of the two ways of event propagation in the HTML DOM API (event bubbling and capturing)

 

when an event occurs in an element inside another element and both elements have registered a handle for that event

 

the event propagation mode determines in which order the elements receive the event

Term

JAVASCRIPT

 

What is event delegation in JavaScript?

Definition
a technique by which you add a single event handler to a parent element in order to avoid having to add event handlers to multiple child elements
Term

JAVASCRIPT

 

What is prototypical inheritance (prototype based inheritance)?

 

Definition
  • every object has a property called prototype
  • you can add methods and properties to the prototype
  • prototype is passed from parent to child
Term

JAVASCRIPT

 

What is the difference between === and ==?

Definition

===

compares both value and type as they are

 

==

attempts to convert the type to match before comparing the value

if it cannot match the types it returns false

Term

JAVASCRIPT

 

What is the difference between Global, Local and Block scope?

 

Definition

Global

  • Encompasses the entire could
  • variable is accessible anywhere in the code

Local

  • Limited to within a function
  • variable is not accessible out side of that function

Block

  • introduced in ES6
  • with a set of { }
  • variable is not accessible outside of the block
Term

JAVASCRIPT

 

What is the difference between a functional declaration and a function expression?

Definition

functional declaration

  • function funcName() {}
  • hoists
  • cannot pass to another function

function expression

  • let decFunc = function(){}
  • variable = anonymous function
  • function does not hoist, only the variable
  • behaves like a variable
  • can pass to another function
Term

JAVASCRIPT

 

What is the difference between let and const?

Definition

let

  • used to assign variables
  • value can be reassigned
  • value can be modified

const

  • used to assign variables
  • cannot be reassigned
  • can be modified
Term

JAVASCRIPT

 

What is the difference between null and undefined?

 

Definition

null

  • represents an empty value
  • you assign null as a the value, not the script
  • null's type = object

undefined

  • represents and empty value
  • placeholder assigned by javascript
  • undefined's type = undefined
Term

JAVASCRIPT

 

What is the use of an arrow function?

Definition
  • arrow functions are a syntactically compact alternative to a regular function
  • they don't have their own binding (this, arguements, super, etc...)
  • they are best suited for non method functions because of their lack of "this"
  • cannot be used as constructor function
  • do not have the prototype property
  • helpful with things like .map 
Term

NODE JS

 

How do you avoid callback errors in Node.js?

Definition

By using error first callbacks

  • passes the error as the first parameter and checks to see if something went wrong
  • handles the error if one is found so that the program doesn't crash but instead provides a useful explanation of what happened so that it can be fixed and the program continues on if still possible
Term

REACT

 

How do you create a component in React?

Definition
  • There are many ways to create a component in React
  • The type of component you make depends on the needs you have in the program at that time
  • The available options is continually updating as React evolves

 

Examples of component types:

  • Class Component
  • Stateful Component
  • Stateless Component
Term

REACT

 

How do you declare a class component in React?

Definition

class ComponentName extends React.Component {

        render(){

               return (<div></div>)

        }

}

Term

REACT

 

Show and example of a functional class component:

Definition

class RandomComponent extends React.Component {

    render() {

        return (

            <div></div>

        )

    }

}

Term

REACT

 

What are the benefits of using React?

Definition
  • it increases the application's performance
  • it can be conveniently used on the client as well as server side
  • because of JSX code's readability increases
  • React is easy to integrate with other frameworks
  • writing UI test cases becomes easier
Term

REACT

 

What is JSX?

 

Definition
  • JSX is short hand for JavaScript XML
  • JavaScript with HTML like syntax
Term

REACT

 

What is React?

Definition
  • a front-end JavaScript library developed by Facebook
  • follows the component based approach to build reusable UI components
  • it is used for developing complex and interactive web and mobile UI
Term

REACT

 

What is the difference between Real DOM and Virtual DOM?

Definition

Real DOM

  • updates slowly
  • can directly update HTML
  • creates a new DOM if element updates
  • DOM manipulation is very expensive
  • too much memory wastage

Virtual DOM

  • updates faster
  • can't directly update HTML
  • updates the JSX if element updates
  • DOM manipulation is very easy
  • no memory wastage
Term

REACT

 

What is the difference between stateful and stateless components?

Definition

Stateful

  • stores info about component's state change in memory
  • you have authority to change state
  • contains the knowledge of past, current, and possible future changes in state
  • can be notified by a stateless component about the requirement of the state change, then send the props down to them

Stateless

  • calculates the internal state of the component
  • do not have the authority to change state
  • contains no knowledge of past, current and possible future state changes
  • receive props from the stateful component and treat them as callbacks
Term

REACT

 

What sets React apart from other JS Libraries?

Definition
  • Uses virtual DOM (unlike Angular)
  • Renders server side (less work for the user's device)
  • Only the view of MVC
  • One-way data binding
  • Compile time debugging
Term

SQL

 

What are joins in SQL?

Definition
a join is a statement used to combine data or rows from two or more tables based on a common field between them
Term

SQL

 

What are the different subsets of SQL?

Definition

DDL (Data Definition Language)

the commands that can be used to define the database schema

 

DML (Data Manipulation Language)

the commands that deal with manipulation of the data in the database

 

DCL (Data Control Language)

the commands that control access to the data in the database

 

TCL (Transaction Control Language)

the commands that deal with the data transactions within the database

 

Term

SQL

 

What do blank cells equal?

Definition
null
Term

SQL

 

What does DBMS mean and what are the different types?

Definition

Database Management System

 

  • Hierarchical (tree structure)
  • Relational (this relates to that)
  • Network 
  • Object Oriented
Term

SQL

 

What does table and field mean in SQL?

Definition

table is the collection of data (spreadsheet)

 

field is the column in the table

 

database is a collection of tables

Term

SQL

 

What is normalization?

Definition

the process that allows a database to be designed so that it can be more versatility queried

 

uses keys to match between tables

 

the design plans for possible future unknown queries

Term

SQL

 

What is the difference between DELETE and TRUNCATE?

Definition

DELETE removes a single row from a table

 

TRUNCATE is a DELETE statement without the WHERE and deletes everything in the table

Term

SQL

 

What is the difference between and inner join and an outer join?

Definition

inner join

  • gives and intersection of the two tables

outer join

  • will give all of one table plus any from the second table that intersect with the first
  • you can designate which will be the primary table by deciding if it will be a left or a right join or both
Term

SQL

 

What is the difference between SQL and MySQL?

Definition

SQL

  • stands for Structured Query Language
  • is a standard langauge for accessing and mainpulating databases

MySQL

  • is a database management system
  • is a relational database management system
Term

HTTP

 

What is the DOM?

Definition

Document Object Model

 

HTML is parsed by the browser and turned into the DOM

Supporting users have an ad free experience!