Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
JavaScript Interview Questions and Answers
Home
Questions
JavaScript
0
votes
What is the output? const list = [1 + 2, 1 * 2, 1 / 2]; console.log(list);
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? const myLifeSummedUp = ['☕', '', '', '']; for (let item in myLifeSummedUp) { console.log(item); }
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? const add = () => { const cache = {}; return num => {
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
Is this a pure function? function sum(a, b) { return a + b; } A: Yes B: No
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const { firstName: myName } = { firstName: 'Lydia' }; console.log(firstName);
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const box = { x: 10, y: 20 }; Object.freeze(box); const shape = box; shape.x = 100;
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function addToList(item, list) { return list.push(item); }
asked
Mar 11
in
JavaScript
by
DavidAnderson
javacsript-interview-questions-answers
0
votes
What's the output? async function getData() { return await Promise.resolve('I made it!'); }
asked
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? console.log(String.raw`Hello\nworld`);
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? console.log('' + '');
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const name = 'Lydia Hallie'; console.log(name.padStart(13)); console.log(name.padStart(2));
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? // index.js console.log('running index.js'); import { sum } from './sum.js'; console.log(sum(1, 2));
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
With which constructor can we successfully extend the Dog class? class Dog { constructor(name)
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? [1, 2, 3, 4].reduce((x, y) => console.log(x, y));
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
const value = { number: 10 }; const multiply = (x = { ...value }) => { console.log((x.number *= 2)); };
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? let num = 10; const increaseNumber = () => num++; const increasePassedNumber = number => number++;
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const settings = { username: 'lydiahallie', level: 19, health: 90, };
asked
Mar 10
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const person = { name: 'Lydia' }; Object.defineProperty(person, 'age', { value: 21 });
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const user = { name: 'Lydia', age: 21 }; const admin = { admin: true, ...user }; console.log(admin);
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const numbers = [1, 2, 3, 4, 5]; const [y] = numbers; console.log(y);
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const name = 'Lydia'; age = 21; console.log(delete name); console.log(delete age);
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? // counter.js let counter = 10; export default counter; // index.js import myCounter
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const set = new Set([1, 1, 2, 3, 4]); console.log(set
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? class Dog { constructor(name) { this.name = name; } }
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? (() => { let x = (y = 10); })();
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function Car() { this.make = 'Lamborghini'; return { make: 'Maserati' }; }
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function greeting() { throw 'Hello world!'; } function sayHi() {
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-quesitons-answers
0
votes
function getInfo(member, year) { member.name = 'Lydia'; year = '1998'; }
asked
Mar 9
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? [1, 2, 3].map(num => { if (typeof num === 'number') return; return num * 2; });
asked
Mar 7
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the value of num? const num = parseInt('7*6', 10);
asked
Mar 7
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
Page:
« prev
1
2
3
4
5
6
7
...
40
next »
...