Podcast
Questions and Answers
What property is used to change the text color in HTML?
What property is used to change the text color in HTML?
What is the main purpose of the 'class' attribute in HTML?
What is the main purpose of the 'class' attribute in HTML?
Which tag is used to display a table on an HTML webpage?
Which tag is used to display a table on an HTML webpage?
What does a marquee do in HTML?
What does a marquee do in HTML?
Signup and view all the answers
Which of the following are standard CSS display properties?
Which of the following are standard CSS display properties?
Signup and view all the answers
In the rgba(R, G, B, A) color model, what does 'A' represent?
In the rgba(R, G, B, A) color model, what does 'A' represent?
Signup and view all the answers
What does the margin shorthand property 'margin: 40px 100px 120px 80px;' signify?
What does the margin shorthand property 'margin: 40px 100px 120px 80px;' signify?
Signup and view all the answers
Which properties are typically used to format text in CSS?
Which properties are typically used to format text in CSS?
Signup and view all the answers
What is the purpose of the package.json file in a Node.js project?
What is the purpose of the package.json file in a Node.js project?
Signup and view all the answers
What defines child processes in Node.js?
What defines child processes in Node.js?
Signup and view all the answers
How do master and slave clusters function in Node.js?
How do master and slave clusters function in Node.js?
Signup and view all the answers
Which of the following is a key feature of Angular?
Which of the following is a key feature of Angular?
Signup and view all the answers
What is an Angular component primarily used for?
What is an Angular component primarily used for?
Signup and view all the answers
What role does the Angular router serve in a single-page application?
What role does the Angular router serve in a single-page application?
Signup and view all the answers
How can data be passed between components in Angular?
How can data be passed between components in Angular?
Signup and view all the answers
What does lazy loading in Angular optimize for applications?
What does lazy loading in Angular optimize for applications?
Signup and view all the answers
What do Angular lifecycle hooks allow developers to do?
What do Angular lifecycle hooks allow developers to do?
Signup and view all the answers
What are Angular Guards primarily used for?
What are Angular Guards primarily used for?
Signup and view all the answers
What will the output of the following code be? let arr = [1, 2, 3]; arr = 10; console.log(arr.length);
What will the output of the following code be? let arr = [1, 2, 3]; arr = 10; console.log(arr.length);
Signup and view all the answers
What does the function isEven incorrectly return for the input 4?
What does the function isEven incorrectly return for the input 4?
Signup and view all the answers
What does the following code output? let x = 10; function testScope() { let x = 20; console.log(x); } testScope(); console.log(x);
What does the following code output? let x = 10; function testScope() { let x = 20; console.log(x); } testScope(); console.log(x);
Signup and view all the answers
What will the output of this code be? for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1000); }
What will the output of this code be? for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1000); }
Signup and view all the answers
What is the result of executing the following function? function greet(name) { if (!name) { name = 'Guest'; } return Hello, ${name}!
; } console.log(greet()); console.log(greet('Alice'));
What is the result of executing the following function? function greet(name) { if (!name) { name = 'Guest'; } return Hello, ${name}!
; } console.log(greet()); console.log(greet('Alice'));
Signup and view all the answers
What error does the following code produce? try { throw 'An error occurred'; } catch (err) { console.log(error); }
What error does the following code produce? try { throw 'An error occurred'; } catch (err) { console.log(error); }
Signup and view all the answers
What is the effect of using 'display: none;' in CSS?
What is the effect of using 'display: none;' in CSS?
Signup and view all the answers
Which CSS overflow setting allows for scrolling when content exceeds its container?
Which CSS overflow setting allows for scrolling when content exceeds its container?
Signup and view all the answers
What are the eight data types in JavaScript?
What are the eight data types in JavaScript?
Signup and view all the answers
How does '==' differ from '===' in JavaScript?
How does '==' differ from '===' in JavaScript?
Signup and view all the answers
What does Scope refer to in JavaScript?
What does Scope refer to in JavaScript?
Signup and view all the answers
What are callbacks in JavaScript?
What are callbacks in JavaScript?
Signup and view all the answers
What does the Document Object Model (DOM) represent?
What does the Document Object Model (DOM) represent?
Signup and view all the answers
What do 'async' and 'await' keywords accomplish in JavaScript?
What do 'async' and 'await' keywords accomplish in JavaScript?
Signup and view all the answers
How are arrow functions characterized in JavaScript?
How are arrow functions characterized in JavaScript?
Signup and view all the answers
What is the main difference between 'var', 'let', and 'const' in JavaScript?
What is the main difference between 'var', 'let', and 'const' in JavaScript?
Signup and view all the answers
Is Node.js single-threaded?
Is Node.js single-threaded?
Signup and view all the answers
What is npm and its purpose?
What is npm and its purpose?
Signup and view all the answers
What is middleware in the context of Node.js?
What is middleware in the context of Node.js?
Signup and view all the answers
What does the event loop in Node.js signify?
What does the event loop in Node.js signify?
Signup and view all the answers
What is the purpose of the package.json file in Node.js?
What is the purpose of the package.json file in Node.js?
Signup and view all the answers
Study Notes
HTML
-
Text Color: Use the
color
property in inline styles or CSS. - Class Attribute: Groups elements for styling.
-
Table Display: Use the
<table >
tag. - Marquee Tag: Creates scrolling text/images (deprecated).
CSS
-
Display Properties:
block
,inline
,flex
,grid
,none
. -
rgba
Alpha: Represents opacity (0-1). -
Margin Shorthand:
margin: top right bottom left;
. -
Text Formatting: Use properties like
font-family
,font-size
,color
, andtext-align
. -
Hiding Elements:
display: none;
hides and removes from layout,visibility: hidden;
hides but retains space. -
overflow
Property: Controls how overflowing content is handled (e.g., clipping, scrolling).
JavaScript
-
Data Types:
Number
,String
,Boolean
,Undefined
,Null
,Symbol
,BigInt
,Object
. -
==
vs.===
:==
performs type coercion,===
compares value and type. - Scope and Scope Chain: Scope determines accessibility, Scope Chain connects scopes.
- Callbacks: Functions passed as arguments to other functions.
- DOM: Represents HTML elements as a tree-like object model.
-
Async/Await:
async
declares functions that always return promises,await
pauses execution until a promise resolves. -
Arrow Functions: Functions written concisely using
=>
, lackthis
andarguments
. -
var
,let
,const
:var
has function scope,let
andconst
have block scope.let
allows reassignment,const
does not.
Node.js
- Thread Model: Single-threaded JavaScript execution, but uses multiple threads internally (libuv) for I/O.
- npm: Node Package Manager manages JavaScript packages.
- Middleware: Functions executed during HTTP request lifecycle.
- Event Loop: Single-threaded loop handling non-blocking I/O operations.
- package.json: Configuration file for project metadata and dependencies.
- Child Processes: Processes spawned by Node.js for executing tasks in parallel.
- Master/Slave Clusters: Master distributes tasks to worker processes for parallel performance.
Angular
- Key Features: MVC Architecture, Two-way Binding, Dependency Injection.
- Component: The fundamental UI building block (template + logic).
- Router: Manages navigation between components.
-
Data Transfer: Uses
@Input
,@Output
, and services. - Lazy Loading: Loads modules as needed for improved performance.
-
Lifecycle Hooks: Methods executed at specific points during a component’s lifecycle (e.g.,
ngOnInit
). - Guards: Used to control access to routes, like authentication.
Common Errors/Concepts (JavaScript)
-
Error Handling (try/catch):
-
try
block encloses the code that might throw an error. -
catch
block handles potential exceptions. Correct way to catch error in the catch block:catch(err)
->console.log(err)
.
-
-
Hoisting:
- JavaScript Hoisting: Variables/functions declared with
var
are 'hoisted,' meaning they become available in the scope before their declaration.let
andconst
are not hoisted.
- JavaScript Hoisting: Variables/functions declared with
-
i
insetTimeout
: Globalvar
declarations will lead to allsetTimeout
calls referencing the final value ofi
(Example in Question 4). -
if (!name)
: Checks if the parametername
is truthy/falsy. This function returns a default value ("Guest") if the input is missing. -
Scope and Variables: Be aware of where variables are defined (local/global) and how they're accessed within a function. The
x
variable example is an example of a local scope, which is different from the global scope. Correct output includes both the local and global scope value.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge on HTML, CSS, and JavaScript fundamentals with this quiz. Covering topics such as text color, display properties, and data types, this quiz is perfect for beginners looking to strengthen their web development skills.