What is the let keyword used for in ES6?
Example:
let x = 10; if (true) { let x = 20; console.log(x); } console.log(x);
복습용 저장
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.
Know the top ES6 interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top ES6 interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
Example:
let x = 10; if (true) { let x = 20; console.log(x); } console.log(x);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
let name = 'John'; let greeting = `Hello, ${name}!`;
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const add = (a, b) => a + b;
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class Person { constructor(name) { this.name = name; } }
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const numbers = [1, 2, 3]; const doubled = numbers.map(num => num * 2);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const numbers = [1, 2, 3, 4, 5]; const evens = numbers.filter(num => num % 2 === 0);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const numbers = [1, 2, 3, 4, 5]; const result = numbers.find(num => num > 2);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
function sum(...numbers) { return numbers.reduce((acc, num) => acc + num, 0); }
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
function greet(name = 'Guest') { console.log(`Hello, ${name}!`); }
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const target = {}; const source = { a: 1, b: 2 }; Object.assign(target, source);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const arrayLike = { 0: 'a', 1: 'b', length: 2 }; const newArray = Array.from(arrayLike);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const newArray = Array.of(1, 'hello', true);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const numbers = [1, 2, 3, 4, 5]; const includesThree = numbers.includes(3);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const obj = { a: 1, b: 2 }; const entries = Object.entries(obj);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const obj = { a: 1, b: 2 }; const keys = Object.keys(obj);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const obj = { a: 1, b: 2 }; const values = Object.values(obj);
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
const arr = [1, 2, 3]; for (const num of arr) { console.log(num); }
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.