What is the purpose of the 'use strict' directive in JavaScript?
Example:
```javascript
'use strict';
// Strict mode code goes here
```
복습용 저장
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.
Know the top Frontend Developer interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top Frontend Developer interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
Example:
```javascript
'use strict';
// Strict mode code goes here
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
@media only screen and (max-width: 600px) {
body {
font-size: 14px;
}
}```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```html
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
// Storing data in localStorage
localStorage.setItem('username', 'JohnDoe');
// Retrieving data from localStorage
const username = localStorage.getItem('username');
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
/* Inline element example */
span {
display: inline;
}
/* Block element example */
div {
display: block;
}```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```htmlThis is a custom element.
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
html {
font-size: 16px;
}
body {
font-size: 1.5rem; /* 24px */
}
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
/* Example of using transition */
.element {
transition: width 0.5s ease-in-out;
}
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```html
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
// Example using let
let x = 10;
// Example using const
const PI = 3.14;
// Example using var
var y = 5;
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
.box {
width: 200px;
padding: 20px;
border: 2px solid #000;
margin: 10px;
}```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
console.log(5 == '5'); // true
console.log(5 === '5'); // false
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```html
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
// Example using Fetch API with CORS
fetch('https://api.example.com/data', { mode: 'cors' })
.then(response => response.json())
.then(data => console.log(data));
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
function sayHello() {
console.log('Hello, ' + this.name);
}
const person = { name: 'John' };
sayHello.call(person); // Outputs: Hello, John
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
/* Using box-sizing: border-box */
div {
box-sizing: border-box;
width: 200px;
padding: 10px;
border: 5px solid #000;
}```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
function animate() {
// Animation logic goes here
requestAnimationFrame(animate);
}
// Start the animation
animate();
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
/* Make the element non-interactive */
.non-interactive {
pointer-events: none;
}```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
console.log(x); // Outputs: undefined
var x = 5;
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
function outer() {
let x = 10;
function inner() {
console.log(x);
}
return inner;
}
const closureExample = outer();
closureExample(); // Outputs 10
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```css
#id-selector {
color: red; /* higher specificity */
}
.class-selector {
color: blue;
}
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
// HTML:
- Item 1
- Item 2
const list = document.getElementById('myList');
list.addEventListener('click', function(event) {
if (event.target.tagName === 'LI') {
console.log('Clicked on:', event.target.textContent);
}
});
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
```javascript
function createCounter() {
let count = 0;
return function() {
console.log(count++);
};
}
const counter = createCounter();
counter(); // Outputs: 0
counter(); // Outputs: 1
```
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.