Web Technologies Flashcards

1
Q

What is the purpose of HTML5’s <canvas> element?</canvas>

A

The <canvas> element provides a way to draw graphics, animations, and other visual content using JavaScript.</canvas>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the box model in CSS.

A

The box model describes how elements are structured in terms of content, padding, border, and margin.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you include JavaScript in an HTML page?

A

You can include JavaScript using the

 tag, either inline or by referencing an external file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between null and undefined in JavaScript?

A

null is a deliberate absence of value, while undefined signifies a variable that has been declared but hasn’t been assigned a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain CSS specificity.

A

CSS specificity determines which styles are applied when there are conflicting rules. It’s based on the combination of selectors used in the rule.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is event delegation in JavaScript?

A

Event delegation is a technique where you attach an event handler to a parent element and let it handle events on its child elements, reducing memory consumption and improving performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a closure in JavaScript?

A

A closure is a function that captures variables from its containing lexical scope, allowing those variables to be accessed even after the outer function has finished executing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain the concept of hoisting in JavaScript.

A

Hoisting is the behavior where variable and function declarations are moved to the top of their containing scope during the compilation phase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does CSS Flexbox work?

A

Flexbox is a layout model that allows you to design complex layouts with a more efficient and predictable arrangement of elements in a container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the localStorage and sessionStorage APIs in JavaScript?

A

These APIs allow you to store key-value pairs in the browser. localStorage stores data with no expiration, while sessionStorage stores data for the duration of a session.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does AJAX stand for?

A

AJAX stands for “Asynchronous JavaScript and XML,” a set of techniques for making asynchronous requests to a server from a web page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you create an AJAX request in JavaScript?

A

You can use the XMLHttpRequest object or the more modern fetch API to create AJAX requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is JSON?

A

JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you parse JSON in JavaScript?

A

You can use the JSON.parse() method to convert a JSON string into a JavaScript object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is CORS, and why is it important?

A

CORS (Cross-Origin Resource Sharing) is a security feature implemented by browsers to prevent unauthorized requests from different origins. It ensures that requests are made only to trusted sources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a single-page application (SPA)?

A

An SPA is a web application that dynamically updates content on a single web page, providing a more fluid and seamless user experience.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the virtual DOM in React?

A

The virtual DOM is a lightweight copy of the actual DOM in memory. React uses it to efficiently update the actual DOM by minimizing direct manipulations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain two-way data binding in Angular.

A

Two-way data binding automatically synchronizes data between the model and the view, so changes in the view are reflected in the model and vice versa.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a component in Vue.js?

A

In Vue.js, a component is a reusable and self-contained unit that encapsulates both the UI and its behavior.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the purpose of React Router?

A

React Router is a library that enables client-side routing in a React application, allowing you to create different “pages” within a single-page application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How does Angular handle dependency injection?

A

Angular has a built-in dependency injection system that allows you to manage and inject dependencies into components, services, and other parts of the application.

22
Q

What is Vuex in Vue.js?

A

Vuex is a state management library for Vue.js applications, providing a centralized store to manage the application’s state and data.

23
Q

What is JSX in React?

A

JSX (JavaScript XML) is a syntax extension for JavaScript used with React to describe what the UI should look like.

24
Q

Explain the concept of props in React.

A

Props (short for properties) are a way to pass data from a parent component to a child component in React.

25
How do you handle forms and user input in Angular?
Angular provides the ngModel directive and reactive forms to handle user input and form validation.
26
What is the purpose of the tag in HTML?
The tag provides metadata about the HTML document, such as character encoding, authorship, and viewport settings.
27
Explain the concept of event propagation in JavaScript.
Event propagation describes the order in which events are processed as they bubble up from the target element through its ancestors or capture down from ancestors to the target.
28
How can you include an external CSS file in an HTML document?
You can link an external CSS file using the element within the section of the HTML document.
29
What is the purpose of the async attribute in a