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 does this method do? JSON.parse();
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const food = ['', '', '', '']; const info = { favoriteFood: food[0] };
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
Which of these methods modifies the original array? const emojis = ['✨', '', '']; emojis.map(x => x + '✨');
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's its value? console.log('❤️' === '❤️'); A: true B: false
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's its value? const colorConfig = { red: true, blue: false, green: true, black: true, yellow: false, };
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's its value? function compareMembers(person1, person2 = person) { if (person1 !== person2)
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's its value? Promise.resolve(5);
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interveiw-quesitons-answers
0
votes
What's the value of output? const set = new Set(); set.add(1); set.add('Lydia'); s
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answer
0
votes
What's the value of output? const myPromise = () => Promise.resolve('I have resolved!'); function firstFunction()
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the value of output? const one = false || {} || null; const two = null || false || '';
answered
Mar 15
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the value of output? const output = `${[] && 'Im'}possible! You should${'' && `n't`}
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const name = 'Lydia'; console.log(name()); A: SyntaxErr
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const getList = ([x, ...y]) => [x, y] const getUser = user => { name: user.name, age: user.age }
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const info = { [Symbol('a')]: 'b', };
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? class Person { constructor() { this.name = 'Lydia'; } }
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function nums(a, b) { if (a > b) console.log('a is bigger'); else console.log('b is bigger');
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function getItems(fruitList, ...args, favoriteFruit)
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? const person = { name: 'Lydia', age: 21, };
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? function giveLydiaPizza() { return 'Here is pizza!'; }
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? let newList = [1, 2, 3].push(4); console.log(newList.push(5));
answered
Mar 13
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? class Person { constructor(name) { this.name = name; } }
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? // module.js export default () => 'Hello world'; export const name = 'Lydia';
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answer
0
votes
What's the output? function sum(num1, num2 = num1) { console.log(num1 + num2); } sum(10);
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What's the output? console.log('I want pizza'[0]);
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
Which option is a way to set hasName equal to true, provided you cannot pass true as an argument?
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What kind of information would get logged? fetch('https://www.website.com/api/user/1') .
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? function checkAge(age) { if (age < 18) { const message = "Sorry, you're too young."; }
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? const person = { name: 'Lydia', age: 21, };
answered
Mar 12
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? var status = ''; setTimeout(() => { const status = '';
answered
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
0
votes
What is the output? function sayHi(name) { return `Hi there, ${name}`; }
answered
Mar 11
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
To see more, click for all the
questions in this category
.
...