• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/78

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

78 Cards in this Set

  • Front
  • Back

What are higher order functions?

Functions that either take in functions as a parameter or return functions

What are JavaScript arrow functions and what is the difference between an arrow function and a regular function?

Arrow functions have different syntax, and they cannot be used as object constructors.

What are JavaScript promises and name a use case

An object representing the eventual completion or failure of an asynchronous operation. Sending an http request to an api that will first send a request to an api, then will return the data based on whether or not the request was successful.

What are the different data types in JavaScript?

Primitive types: string, number, bigInt, Boolean, undefined, null, symbol


Non-primitive: objects, arrays

Explain hoisting in JavaScript

Hoisting is the default behavior in JavaScript where all the variable and function declarations are moved to the top of the scope

What is “debugger” in JavaScript

A debugging keyword that stops the execution of the code where the debugger is declared. It will execute the next lines of code when the debugger is cancelled

What is the difference between “===“ and “==“ operators

Both are comparison operators. The “==“ compares values, while the “===“ compares values and data types

What is the difference between var and let in JavaScript

Var has a function scope. Anywhere in the function, the variable declared using var is accessible. The scope of the variable declared with let is limited to the block in which it was declared

What is implicit type coercion in JavaScript

The automatic conversion of of value from one data type to another. Takes place when the operands of an expression are of different types.


Example:


var x = 1


var y = “2”


x + y returns “12”

Is JavaScript a dynamically typed language or a statically typed language?

JS is dynamically typed, meaning the type of a variable is checked during run-time. in a statically typed languages, variable types are checked during compile time. Because of this, variables in JS are not associated with any data type. Any variable can be any data type.

What is NaN property in JS

Indicates a value that is not a legal number

Explain passed by value and passed by reference

Primitive data types are passed by value and non-primitive data types are passed by reference

What is a immediately invoked function?

A function that runs as soon as it is defined

What is “strict mode” in JavaScript

A way of coding in JavaScript that throws additional errors to help debugging.


Examples:


Duplicate arguments are not allowed


Can’t use the JavaScript keyword as a parameter or function name


The keyword is used at the start of the script and is supported by all browsers


Cannot create global variables

Explain the “this” keyword

The keyword refers to the object that the function is a property of. The value of “this” will always depend on the object that is invoking the function

Explain call(), apply(), and bind() methods

Call()


Invokes a method by specifying the owner object


Apply()


The same as call, but takes arguments as an array


Bind()


Returns a new function, where the value of “this” keyword will be bound to the owner object, which is provided as a parameter

What is currying in JavaScript?

Transforms a function of arguments n, to n functions of one or fewer arguments


Example:


function add(a)


return function(b) {


return a + b


}


}


add(3)(4) // returns 7

What are advantages of using an external file to write Js code? (Outside of the html file)

Allows collaboration between developers and designers


Can reuse code


Improves code readability

Explain scope and scope chain in Js

The scope determines what variables are and are not accessible in a given part of the code.


Global scope:


Variables or functions declared in the global namespace. These variables and functions will be accessible anywhere throughout your code file


Function scope:


Variables declared inside of a function will only be accessible inside that function


Block scope:


Variables declared inside a block of code {} are only accessible inside that block of code


Scope chain:


If you have a global variable, and deeply nested block of code that wants to access that variable, the block of code will go one level up, check if the variable is there, and will grab the variable on that level if it is there. If it is not on the next level up, it will go one more level up and so on

Explain closures in JS

A function that has access to the variables in the scope in which it was created, even if the scope is no longer active. This allows the function to “remember” it’s environment and use it even after the scope in which it was created has been closed.

What are object prototypes?

A prototype is a blueprint for an object and allows us to use its properties

What are callbacks?

A function that will be executed after another function gets executed

What is memoization?

A form of caching where the return value of a function is cached based on its parameters. If the parameters of that function is not changed, the cached version of the function is returned.

What is recursion?

A technique to iterate over an operation by calling itself repeatedly until a desired result is achieved

What is a constructor?

They are used to create objects. If we want to create multiple objects having the same properties and methods, we use a constructor function

What is the DOM?

DOM stands for document object model. It is an object representing the HTML document so we can manipulate or change various elements inside the HTML document

What is BOM?

Browser object model. An object representing the browser that allows us to interact with the browser. For example, the window object is accessible, which allows us to access different properties of the browser such as the document, history, screen, navigator, location, etc.

What is the difference between client-side and server-side JavaScript?

Client-side means that the processing takes place on the users computer. It requires browsers to run the scripts on the client machine without involving any processing on the server. Server-side means that the processing takes place on the web server.

What is the rest parameter?

Using the rest parameter syntax, we can create a function that can take any number of arguments. These arguments will be converted into an array after being passed to the function.


Represented by 3 dots:


function go(…args) {


…..


}

What is the spread operator?

If is used to spread an array, and object literals.


For example, if a function takes 4 numbers, we could pass an array containing 4 numbers to the function using the spread operator. The function will recognize the passed spread array as 4 separate arguments.

What is object oriented programming?

A model that organizes software design around objects. Allows us to focus on the objects that we want to manipulate, rather than the functions that we use to manipulate them.

What are the benefits of OOP?

Code is easier to understand, read, and maintain

What are the 4 pillars of object oriented programming?

Inheritance


Encapsulation


Polymorphism


Abstraction

What is inheritance in OOP?

Inheritance is a way to reuse code from existing objects, or to establish a subtype of an existing object. With inheritance you can new classes that reuse, extend, or modify the behavior that is defined in other classes.

What is Polymorphism in OOP?

A concept where a single entity, such as a function or object, can have multiple forms. This allows functions or objects to be written in a more general way so they can handle a variety of different scenarios.

What is Abstraction in OOP?

Abstraction is the process of hiding internal data and implementation to create a boundary between the application and our client programs.

What is Encapsulation in OOP?

The process of combining properties and methods together that belong together in a single unit called a class. This allows the data and behavior of an object to be treated as a single entity, while also providing a level of protection and control over the objects behaviors.

What is a class?

A blueprint or prototype for creating objects. It defines the properties and behaviors that an object of that class will have, and provides a way to create and initialize objects of that class.

What is an object?

An object is a instance of a class. It is a real-world entity that has a set of attributes, or properties, that define its state, and a set of behaviors, or methods, that define its interactions with other objects.

What is a constructor?

A special type of method that is called when an object is created. It is responsible for initializing the objects properties and setting its initial state.

What is an interface?

A construct that defines a set of related behaviors that a class or object can implement. It specifies a contract that defines what methods a class must implement, but it does not provide any implementation for those methods.

What is a copy constructor?

It is a special type of constructor that is used to create a new object as a copy of an existing object. It takes a single argument, which is a reference to the object that is being copied. It initializes the new object with the same values as the original object.

What is a destructor?

A function that is used to free up resources that we’re allocated to an object. It is called automatically when an object is no longer needed, such as when it goes out of scope or is deleted.

What is a subclass?

A class that is derived from another class, known as the superclass. A subclass inherits the properties and methods of its superclass, and can also have its own unique properties and methods.

What is a superclass?

It is a class from which other classes are derived. It defines the properties and methods that are common to all of its subclasses, which are inherited from the superclass.

What is a database?

A database is a collection of data that is organized in a way that allowed for efficient search and retrieval. It typically consists of multiple tables, each containing a number of records (rows) with a predefined set of fields (columns).

What is a DBMS?

Stand for database management software, which are software programs used to create, manage, and query databases

What are the various types of relationships in a database?

One-to-one relationship:


A relationship between two entities, where each entity is associated with only one instance of the other entity.


Example: a person only has 1 social security number



One-to-many relationship:


A relationship between two entities, where a single instance of one entity is associated with multiple instances of the other entity.


Example: a single person may have multiple phone numbers



Many-to-many relationship:


A relationship between two entities, where multiple instances of one entity are associated with multiple instances of the other entity.


Example: a student may take multiple courses, and a course may have multiple students attending.

Explain normalization vs. de-normalization in a database

Normalization:


Organizing a database in a way that minimizes redundancy and dependency. Typically done by splitting the data into multiple tables and defining relationships between the two tables. This structures the database in a more logical way, and reduces inconsistencies with your data.


De-Normalization:


The process of deliberately adding redundancy to a database that has been normalized. Typically done for the sake of improving performance, such as by duplicating data in multiple tables to avoid costly join operations. It can improve the speed of certain database operations, but also risks data inconsistencies and is more difficult to maintain.

What is SQL?

Stands for Structured Query Language, and is a programming language that is used to manage and manipulate data stored in relational databases. It provides a number of powerful commands for querying and modifying data, such as selecting, inserting, updating, and deleting data.

What are the different types of SQL statements?

Data Definition Language (DDL):


Commands that are used to define the structure that holds the data.


Examples:


CREATE, ALTER, TRUNCATE, DROP, RENAME



Data Manipulation Language (DML):


Commands used to manipulate the data of the database


Examples:


INSERT, UPDATE, DELETE, MERGE



Data Control Language (DCL):


Commands used to control the visibility of the database like revoke access permission for using data in the database.


Examples:


COMMIT, ROLLBACK, SAVEPOINT

What is a “Record” in a database?

Collection of values or fields of a specific entity.


Example: Employee, salary, etc.

What is a “Field” in a database?

An area within a record that is reserved for specific data.


Example: Employee ID

What is a “Table” in a database?

Collection of records of specific types.


Example: The Employee tables is a collection of records related to all employees.

What is data independence?

The ability to change the structure of a database without affecting the programs that use the database. Allows the database to evolve and be modified over time without disrupting the applications that depend on it.

What are the two types of data independence?

Logical Data Independence:


The ability to change the logical structure of a database (the tables and the relationships between data) without affecting the programs that use the data.



Physical Data Independence:


Ability to change the physical structure of a database (like the way the data is stored on a disk) without affecting the programs that use the database.

What is a “View” for a database?

A virtual table that is based on the result of an SQL query. A view is not a physical table that exists in a database, but rather a way of looking at the data in a database. You can think of a view as a saved query that you can use to access and manipulate the data in a database.

What is a E-R model?

Stands for Entity Relationship model, which is a graphical representation of the entities, relationships, and attributes in a database.

What is a “Join”?

A method to combine data from different tables based on a common field or set of fields.


Example:


A table with customer information and a table or order information in an online store. You can use a join to combine the two tables into a single result that includes all the relevant data for a particular customers order.

What is a “Cursor”?

A control structure that enables traversal over the records in a database.

What are the two types of cursors?

Implicit cursor:


A cursor that is created and managed by the database software, without the need of a programmer to specify or manage the cursor directly.


Explicit cursor:


A cursor that is created and managed by a programmer allowing the programmer to perform operations on the data in the database, such as updating or deleting a row, or using the data in a row to calculate another value.

What is data warehousing?

The process of organizing and storing large amounts of data in a central location for easy access and analysis. It is specifically designed to to store and manage large volumes of data from multiple sources, and to provide fast and efficient access to that data for analysis and reporting.

What is a “clustered” and “non-clustered” index?

Cluster:


Type of index that physically reorders the rows of a table based on the indexes columns.


Non-Cluster:


Does not physically re-order the rows of a table, instead, it creates a separate data structure that contains the indexed columns and pointers to the corresponding rows in the table.

What is fragmentation?

Breaking up a large block of data into smaller, more manageable pieces. This is done to increase the efficiency and performance of a program

What are the different types of database joins?

Inner Join:


Combines only the rows that have matching values in both tables.



Outer Join:


Includes all rows from both tables even if they don’t have matching values. There are 3 subtypes of outer joins:


1. Left outer join:


Includes all rows from the left table, and only the matching rows from the right table.


2. Right Outer Join:


Includes all rows from the right table, and only the matching rows from the left table.


3. Full Outer Join:


Includes all rows from both tables even if they don’t have matching values.



Cross Join:


Combines every row from the first table and every row from the second table.

What is atomicity?

Ensures that a group of related database operations are either all executed successfully, or all rolled back and undone in the event of an error or failure.

What is aggregation?

The process of combining multiple pieces of data into a single, larger data structure. It is used to group related data together and make it easier to work with and analyze.

What are the different types of keys in a database?

Primary Key:


A unique identifier for each record in a table. It must be a unique value, and cannot be NULL.



Foreign Key:


A field that refers to the Primary Key of another table, establishing a relationship between the tables.



Candidate Key:


A field or set of fields that could be used as a primary key. A table can have multiple candidate keys, but only one primary key.



Composite Key:


A primary key made up of two or more fields.



Surrogate Key:


A synthetic primary key, typically an auto-incrementing integer, that is used to uniquely identify each record in a table.

What is an bubble sort?

An algorithm that compares each pair of adjacent items and swaps them if they are in the wrong order. This continues until the list is fully sorted.

What is a insertion sort algorithm?

An algorithm that works by iterating over the items in the list and inserting each item into its correct position in the sorted part of the list.

What is a selection sort algorithm?

An algorithm that works by repeatedly selecting the smallest, or largest, element from the unsorted portion of the data and moving it to the sorted portion of the data. It does this by comparing each element in the unsorted portion of the data with every other element in the unsorted portion, and keeping track of the smallest, or largest element that it has seen so far.

What is a merge sort algorithm?

A sorting algorithm that divides the unsorted data set into two smaller data sets, sorting each of these data sets individually. It then merges the two sorted data sets back together in order to produce a final, fully sorted data set. It does this by repeatedly splitting the unsorted data set in half until each individual element is it’s own dataset, which is then sorted, and then merging these sorted data sets together in a specific way that maintains their sorted order.

What is a quick sort algorithm?

A sorting algorithm that uses the divide-and-conquer approach to sort a list of items. It chooses a pivot element from the list and then partitioning the other elements into two lists, based on whether they are larger or smaller than the pivot. It then recursively sorts the two sub lists until the entire list is sorted.

What is a linear search algorithm?

A search algorithm that looks for an item by iterating through the entire list of items one at a time until the item is found. Easy to implement, but not efficient for large lists.

What is a binary search algorithm?

A search algorithm that only works on sorted lists. It works by repeatedly dividing the list in half and checking which half the item falls in. This process is repeated until the item is found or it is determined that the item is not in the list.

What is a depth first search algorithm?

A search algorithm used for traversing trees or graphs. It explores as far as possible down one branch of the tree before backtracking and trying a different branch. This algorithm is often used in AI applications for exploring possible states or solutions.

What is a hashing algorithm?

A hashing algorithm is a mathematical function that converts a input of arbitrary size (called the “message”) into a fixed-size output(called the “hash value” or “digest”). They are commonly used to create one-way hashes of passwords, which are stored in a database and compared with user entered passwords to verify authenticity.

Why is a Asynchronous function?

A function that is designed to perform tasks that may take time to complete. When an async function is called it returns immediately, allowing the program to continue executing code while the task is being performed in the background.