logged out
Dark Mode
Show all answers
About
All
OOP
NB
Arrays
Functions
Acronyms
Objects
Data Structures
Networking
Database
CSS
test
test2
Basics
Reveal answer.
What is a modal?
id:133
A modal is a popup web page element that displays in front of and deactivates the rest of the page
Reveal answer.
What is composition?
id:30
composition- to compose. Everything in JS, other than primitives, are objects. High level objects, such as functions, are quite complex in nature. To simplify such complex objects, many small objects are composed together.
Objects
Reveal answer.
What is the window object in JS?
id:65
The window object is the global object when JS runs in a browser. The window object represents an open window in a browser. All global objects, functions and variables are members of the window object. Global variables and functions are properties of the window object. The document object is a property of the window object, hence window.document.queryselector is the same as document.queryselector. In a tabbed browser each tab is represented by its own window object. Therefore the global window object, as seen by javascript code, represents the tab in which the code is running. That said, some properties still apply to the overall window. resizeTo() innerHeight. var statements and function declarations at the top level create properties of the global object. Let and const declarations never create properties of the global object.
Acronyms
Reveal answer.
DNS - What is a Domain name server?
id:164
DNS protocol convert domain names into IP addresses.
NB
Reveal answer.
What is asynchronous code?
id:62
Synchronous code is code which runs one statement at a time. If a particular statement requires time to perform its action, this results in blocking code, which stalls the program until the statement has finished executing. Asynchronous code solves this problem, by allowing the program to continue execution in one thread, while a concurrent thread waits for the result of the asynchronous statement. Examples are callbacks, promises, async/await What is blocking code? Blocking code is when a statement is waiting for a return(ie from fetch)
OOP
Reveal answer.
What is the super() keyword?
id:37
When using extends to extend the functionality of a class, if we exclude the constructor the derived class will invoke the constructor of its parent class. If we intend to add unique properties to the derived class, we can achieve this by creating its own constructor and invoking super() to inherit the properties of the parent class.
Reveal answer.
What is tree shaking?
id:146
Tree shaking is a term commonly use for dead code elimination Capturing Capturing phase happens first. Moves from top level down the DOM tree to the target element. Then the Bubbling happens from there up. Capturing - document-> grandparent -> parent -> child Bubbling - move up the tree from child -> parent -> grandparent ->document. Capture events are added as a third parameter. Automatically set to false. child.addEventListener(‘click’, e => { console.log(‘I was clicked’) }, {capture: true} ) e.stopPropagation() => prevents any further capturing or bubbling
Acronyms
Reveal answer.
What is a progressive web app?
id:95
PWA are websites that look and behave as if they are a mobile app in that they can function without an internet connection. A progressive web app is a type of software app delivered through the web, which is intended to work on any platform, through a web browser. Alternative to native apps.
Data Structures
Reveal answer.
What is DHCP?
id:158
Dynamic host configuration protocol. Assigns ip address
CSS
Reveal answer.
Difference between visibility:hidden; and display:none?
id:80
Display none completely removes the element from the document flow. Visibility hidden leaves the element, it continues to take up space, but its contents are not seen.