人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

Frontend Developer 面接の質問と回答

質問 26. What is a closure in the context of JavaScript's event handling?

In the context of event handling, a closure allows a function to retain access to variables in its lexical scope even after the outer function has finished executing. This is often used to maintain state across multiple event callbacks.

Example:

```javascript
function createCounter() {
  let count = 0;
  return function() {
    console.log(count++);
  };
}

const counter = createCounter();
counter(); // Outputs: 0
counter(); // Outputs: 1
```

役に立ちましたか? コメントを追加 コメントを見る
 

質問 27. What is the difference between 'inline' and 'block' elements in CSS?

'inline' elements only take up as much width as necessary and do not start on a new line. 'block' elements take up the full width available and start on a new line.

Example:

```css
/* Inline element example */
span {
  display: inline;
}

/* Block element example */
div {
  display: block;
}```

役に立ちましたか? コメントを追加 コメントを見る
 

質問 28. Explain the purpose of the 'box-sizing' property in CSS.

The 'box-sizing' property determines how the total width and height of an element are calculated. 'content-box' includes only the content, while 'border-box' includes padding and border in the calculation.

Example:

```css
/* Using box-sizing: border-box */
div {
  box-sizing: border-box;
  width: 200px;
  padding: 10px;
  border: 5px solid #000;
}```

役に立ちましたか? コメントを追加 コメントを見る
 

質問 29. What is the purpose of the 'data-' attribute in HTML?

The 'data-' attribute is used to store custom data private to the page or application. It provides a way to attach additional information to HTML elements without using non-standard attributes.

Example:

```html
This is a custom element.

```

役に立ちましたか? コメントを追加 コメントを見る
 

質問 30. What is the difference between 'throttling' and 'debouncing' in JavaScript?

'Throttling' limits the number of times a function can be called within a specified time frame, while 'debouncing' ensures that a function is only called after a certain amount of time has passed since the last invocation.

役に立ちましたか? コメントを追加 コメントを見る
 

ユーザー評価で最も役立つ内容:

著作権 © 2026、WithoutBook。