Flashcards
Bloc Module 1 Frontend Fundamentals Part 2

Cards in this deck (51)
- 1What is the map() function?

- 2What is the filter() function?

- 3What is the reduce( ) function?

- 4How can you use map( ), filter ( ) and reduce ( ) together in a chain?

- 5What does "iterate" mean?The process of repeating the same set of instructions.
- 6—


- 7What will this line of Javascript evaluate to: '1' === 1?false
- 8What will this line of Javascript evaluate to: '1' == 1?true
- 9How many times will a for loop with the following code run: for(var i=0; i<10; i++){...}10 times.
The loop starts at 0 and up to 9 which is less than 10 (terminating condition).
0-9 = 10 numbers. - 10What is the correct format for an if statement in Javascript?if(foo < 10){...}
- 11What built in Javascript function will pop up a box that allows the user to enter information?input();
- 12What will this line of Javascript evaluate to: typeof "Foo"?string
- 13—


- 14What is an object in JS?JavaScript centers around a simple object-based paradigm. Simply put, an object is a collection of properties, where a property is an association between a name (or key) and a value.
- 15What is object literal syntax?

- 16How do you use the 'new' keyword to create an object in JS?

- 17What are the 2 ways to add key/value pairs to an object in JS?

- 18—


- 19—


- 20What is the DOM?DOM stands for Document Object Model. The DOM is just a JavaScript representation of all the HTML tags on a page. The DOM is a single object (the entire page) that has many nested objects within it (each HTML element).
This object also gets special methods added to it to help find each element or a group of elements within the object. - 21What is the "Old School" group of built-in functions that help you query/find single elements or groups of them on an HTML document?They are:
getElementById
getElementsByClassName
getElementsByTagName - 22—


- 23—


- 24—


- 25—


- 26—


- 27—


- 28—


- 29—


- 30—


- 31—JavaScript variables can belong to the local or global scope. Global variables can be made local (private) with closures so we create a closure when an inner function is made accessible from outside its parent function. Closures are functions with preserved data that can be accessed by new variables/functions down the road.To use a closure, simply define a function inside another function and expose it. To expose a function, return it or pass it to another function.

- 32—


- 33—


- 34What is object-oriented programming?Object-oriented programming (or OOP) is a paradigm or pattern of programming whereby the solution to a programming problem is modelled as a collection of collaborating objects. Objects collaborate by sending messages to each other. It is most suitable for managing large, complex problems.
- 35What is the purpose of the keyword 'super'?The super keyword is used to access and call functions on an object's parent.
- 36—


- 37—


- 38What is recursion?Loosely defined, recursion is the process of taking a big problem and sub-dividing it into multiple, smaller instances of the same problem.
Put into practice, that generally means writing a function that calls itself. Probably the most classic example of this concept is the factorial function. - 39What is a base case and what is its role in a recursive function? What would happen if a programmer did not utilize a base case within a recursive function?All recursive function calls must have a base case. A base case is a specific condition that causes the function to return a value instead of calling itself again. In a factorial example, if (x === 0) return 1; is the base case.
Without a base case, the function would keep calling itself indefinitely. It would be an infinite loop that never returns. - 40—


- 41—


- 42—


- 43There were 3 total request/response cycles. One to pull up the page, one when a link was clicked, and one when a form was submitted.

- 44—


- 45—


- 46—


- 47—


- 48—


- 49—


- 50—


- 51—

Information
- Description
- Flashcards on Bloc Module 1 Frontend Fundamentals Part 2 , created by brenda velasquez on 03/12/2018.
- Created by
- brenda velasquez
- Views
- 3
- Rating