89 results

AngularJS·Intermediate·5.2.1

What is the basic distinction between a controller and a service in AngularJS?

AngularJS·Intermediate·5.2.2

How does AngularJS actually resolve a dependency like $scope or a custom service name when injecting it into a controller?

AngularJS·Intermediate·5.2.3

What is the basic purpose of the $http service?

AngularJS·Intermediate·5.2.4

In a custom directive definition, what does the restrict option with the value 'E' mean?

AngularJS·Intermediate·5.2.5

What does the template option in a directive definition object do?

AngularJS·Intermediate·5.2.6

What does the pipe syntax in an expression like {{ name | uppercase }} represent?

AngularJS·Intermediate·5.2.7

What is the basic purpose of 'track by' in an expression like ng-repeat="item in items track by item.id"?

AngularJS·Intermediate·5.2.8

What is the basic role of the ngRoute module's $routeProvider?

AngularJS·Intermediate·5.2.9

What does $location provide in AngularJS?

Brain Teasers·Intermediate·1.2.1

You're in a race and you pass the person in 2nd place. What place are you in now?

Brain Teasers·Intermediate·1.2.2

A man looks at a photo and says: 'Brothers and sisters, I have none. But that man's father is my father's son.' Whose photo is he looking at?

Brain Teasers·Intermediate·1.2.3

How many months of the year have 28 days?

Brain Teasers·Intermediate·1.2.4

I am an odd number. Take away one letter from my name, and I become even. What number am I?

Brain Teasers·Intermediate·1.2.5

Two fathers and two sons go fishing together. Together they catch exactly 3 fish, one each. How is this possible?

Brain Teasers·Intermediate·1.2.6

A boy and his father are in a serious car accident. The father dies at the scene; the boy is rushed to the hospital. The surgeon looks at the boy and says, 'I can't operate on him -- he's my son.' How is this possible?

Brain Teasers·Intermediate·1.2.7

A butcher is exactly 5 feet 10 inches tall. What does he weigh?

Brain Teasers·Intermediate·1.2.8

A man is pushing his car along a road when he comes to a hotel and immediately shouts, 'I'm bankrupt!' Why?

Brain Teasers·Intermediate·1.2.9

What 5-letter word becomes a 7-letter word that still describes the exact same thing when you add two more letters to the end of it?

Brain Teasers·Intermediate·1.2.10

A doctor gives you 3 pills and tells you to take exactly one every 30 minutes, starting right now. How long until you've taken all 3 pills?

Brain Teasers·Intermediate·1.2.11

You enter a completely dark room containing an unlit oil lamp, an unlit candle, and an unlit fireplace, carrying exactly one match. Which do you light first?

Brain Teasers·Intermediate·1.2.12

Before Mount Everest was discovered by Western explorers, what was the tallest mountain on Earth?

Brain Teasers·Intermediate·1.2.13

How many times can you subtract the number 5 from 25?

Brain Teasers·Intermediate·1.2.14

A man is found dead in an open field. Next to his body lies a small, unopened package. There are no other footprints or tracks anywhere nearby. What happened to him?

Brain Teasers·Intermediate·1.2.15

What word in the English dictionary is always, without exception, spelled incorrectly?

Brain Teasers·Intermediate·1.2.16

There is a one-story pink house. Everything inside it is pink: the pink walls, the pink furniture, the pink carpet. What color are the stairs?

Brain Teasers·Intermediate·1.2.17

If a plane crashes exactly on the border between the United States and Canada, where are the survivors buried?

Brain Teasers·Intermediate·1.2.18

A rooster lays an egg precisely on the peak of a two-sided barn roof. Which side does the egg roll down?

Brain Teasers·Intermediate·1.2.19

Two men play exactly 5 games of checkers against each other. Each man wins the exact same number of games, and there are no ties or draws. How is this possible?

Brain Teasers·Intermediate·1.2.20

A woman shoots her husband, then holds him underwater for a full five minutes, and finally hangs him. Five minutes later, they enjoy a lovely dinner together. How is this possible?

HTML·Intermediate·2.2.1

What does writing 'semantic HTML' mean, and why does it matter?

HTML·Intermediate·2.2.2

What is the key difference between block-level and inline elements in HTML?

HTML·Intermediate·2.2.3

What do a `<form>` element's `action` and `method` attributes control?

HTML·Intermediate·2.2.4

What does the `defer` attribute do when added to a `<script>` tag?

HTML·Intermediate·2.2.5

What is the difference between an element's `id` and `class` attributes?

HTML·Intermediate·2.2.6

Why is it generally considered bad practice to use a `<table>` element purely for visual page layout (rather than for genuinely tabular data)?

HTML·Intermediate·2.2.7

What is the difference between the `rel="nofollow"` and `rel="noopener"` attribute values on an `<a>` tag?

HTML·Intermediate·2.2.8

What does the `<label>` element's `for` attribute do, and why does it matter for accessibility?

HTML·Intermediate·2.2.9

What are HTML5 `data-*` custom attributes used for?

HTML·Intermediate·2.2.10

What is the purpose of the `srcset` attribute on an `<img>` tag?

HTML·Intermediate·2.2.11

What is the difference between the HTTP methods GET and POST when used as a form's `method` attribute?

HTML·Intermediate·2.2.12

What does the `download` attribute on an `<a>` tag do?

HTML·Intermediate·2.2.13

Why does using heading tags (`<h1>`-`<h6>`) purely to make text visually larger/bolder, rather than to represent genuine document structure, cause real accessibility problems?

HTML·Intermediate·2.2.14

What is 'progressive enhancement' as a web development philosophy, and how does it relate to writing HTML?

HTML·Intermediate·2.2.15

What is the purpose of the `<noscript>` element?

HTML·Intermediate·2.2.16

What is the key difference between the `<iframe>` element and simply embedding another page's content via a server-side include or AJAX fetch?

HTML·Intermediate·2.2.17

What is the purpose of pairing `<figure>` and `<figcaption>` elements?

HTML·Intermediate·2.2.18

What do the `<details>` and `<summary>` elements provide, without requiring any JavaScript?

HTML·Intermediate·2.2.19

What does the `pattern` attribute on a text `<input>` element do?

HTML·Intermediate·2.2.20

What effect does a `<base href="https://example.com/docs/">` element in a page's `<head>` have on the rest of the page?

JavaScript·Intermediate·3.2.1

What is the JavaScript event loop responsible for?

JavaScript·Intermediate·3.2.2

What problem do Promises primarily solve compared to plain callbacks?

JavaScript·Intermediate·3.2.3

In a regular (non-arrow) function, what determines the value of `this`?

JavaScript·Intermediate·3.2.4

What do Array methods like `map`, `filter`, and `reduce` have in common?

JavaScript·Intermediate·3.2.5

What is 'hoisting' in JavaScript?

JavaScript·Intermediate·3.2.6

What is destructuring assignment used for?

JavaScript·Intermediate·3.2.7

What does the `...rest` parameter do in a function signature, e.g. `function f(a, ...rest) {}`?

JavaScript·Intermediate·3.2.8

What is the practical difference between `Array.prototype.forEach` and a `for...of` loop regarding `break`/`continue`?

JavaScript·Intermediate·3.2.9

What does `Object.freeze()` do to an object?

JavaScript·Intermediate·3.2.10

What is the purpose of default parameter values in a function declaration, e.g. `function f(x = 10) {}`?

JavaScript·Intermediate·3.2.11

What does `Array.prototype.find()` return when no element satisfies the predicate?

JavaScript·Intermediate·3.2.12

What practical advantage does a `Set` have over an `Array` for storing a collection of values?

JavaScript·Intermediate·3.2.13

What does optional chaining (`obj?.prop`) do?

JavaScript·Intermediate·3.2.14

What is the key difference between the nullish coalescing operator `??` and the logical OR `||`?

JavaScript·Intermediate·3.2.15

What does `Array.prototype.includes()` check for?

JavaScript·Intermediate·3.2.16

What does `Object.entries({a: 1, b: 2})` return?

JavaScript·Intermediate·3.2.17

What does calling an `async` function actually return, even if the function body never explicitly returns a Promise?

JavaScript·Intermediate·3.2.18

What is the (now largely superseded) module pattern using an Immediately Invoked Function Expression (IIFE) used for?

JavaScript·Intermediate·3.2.19

What does `Array.from({length: 3}, (_, i) => i * 2)` produce?

JavaScript·Intermediate·3.2.20

What is a tagged template literal, e.g. `` myTag`Hello ${name}` ``, used for?

React.js·Intermediate·4.2.1

Compared to the class-component lifecycle, when does a `useEffect` with no dependency array run relative to `componentDidMount` and `componentDidUpdate`?

React.js·Intermediate·4.2.2

Two sibling components both need access to the same piece of state, but there's no existing parent holding it. What is the standard React pattern for this?

React.js·Intermediate·4.2.3

What is the purpose of the function you can optionally return from inside a `useEffect` callback?

React.js·Intermediate·4.2.4

What problem does "prop drilling" describe?

React.js·Intermediate·4.2.5

What problem is React's Context API primarily designed to solve?

React.js·Intermediate·4.2.6

What is a "synthetic event" in React?

React.js·Intermediate·4.2.7

In legacy (pre-React-18) behavior, if you call two separate `setState`/state-setter updates inside a single React event handler (like an onClick), what typically happens?

React.js·Intermediate·4.2.8

When rendering a list of items with `.map()`, why is using the array index as the `key` prop often discouraged?

React.js·Intermediate·4.2.9

For a controlled text input, which pattern correctly keeps the input's displayed value in sync with React state?

React.js·Intermediate·4.2.10

What is a basic, legitimate use case for `useRef` at this stage?

React.js·Intermediate·4.2.11

What's the practical tradeoff between wrapping sibling elements in a `<div>` versus a `<React.Fragment>` (`<>...</>`)?

React.js·Intermediate·4.2.12

What is PropTypes (or a TypeScript prop interface) used for in React?

React.js·Intermediate·4.2.13

What does `useReducer` provide that plain `useState` doesn't, at a basic level?

React.js·Intermediate·4.2.14

What is the idiomatic way for a child component to notify its parent that something happened (e.g. a button was clicked inside the child)?

React.js·Intermediate·4.2.15

In a function component, what's the equivalent of a class component's `componentDidUpdate` (code that should run after specific props or state change, but not on the very first render)?

React.js·Intermediate·4.2.16

At a conceptual level, what is a React error boundary for?

React.js·Intermediate·4.2.17

How do you read a value provided by a `Context.Provider` inside a function component?

React.js·Intermediate·4.2.18

If a `useEffect` has an empty dependency array `[]`, when does its effect function run?

React.js·Intermediate·4.2.19

Why does calling a state setter (e.g. from `useState`) not update the variable's value immediately, synchronously, in the very next line of code after calling it?

React.js·Intermediate·4.2.20

What does it mean that JSX "compiles down to" `React.createElement` calls?