Login
Remember
Register
User DavidAnderson
Wall
Recent activity
All questions
All answers
Ask a Question
Questions by DavidAnderson
0
votes
1
answer
What's the output? class Person { constructor(name) { this.name = name; } }
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? // module.js export default () => 'Hello world'; export const name = 'Lydia';
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answer
0
votes
1
answer
What's the output? function sum(num1, num2 = num1) { console.log(num1 + num2); } sum(10);
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? console.log('I want pizza'[0]);
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
Which option is a way to set hasName equal to true, provided you cannot pass true as an argument?
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What kind of information would get logged? fetch('https://www.website.com/api/user/1') .
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? function checkAge(age) { if (age < 18) { const message = "Sorry, you're too young."; }
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? const person = { name: 'Lydia', age: 21, };
asked
Mar 12, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? var status = ''; setTimeout(() => { const status = '';
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? function sayHi(name) { return `Hi there, ${name}`; }
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? const list = [1 + 2, 1 * 2, 1 / 2]; console.log(list);
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? const myLifeSummedUp = ['☕', '', '', '']; for (let item in myLifeSummedUp) { console.log(item); }
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What is the output? const add = () => { const cache = {}; return num => {
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
Is this a pure function? function sum(a, b) { return a + b; } A: Yes B: No
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? const { firstName: myName } = { firstName: 'Lydia' }; console.log(firstName);
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? const box = { x: 10, y: 20 }; Object.freeze(box); const shape = box; shape.x = 100;
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? function addToList(item, list) { return list.push(item); }
asked
Mar 11, 2024
in
JavaScript
javacsript-interview-questions-answers
0
votes
1
answer
What's the output? async function getData() { return await Promise.resolve('I made it!'); }
asked
Mar 11, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? console.log(String.raw`Hello\nworld`);
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
How can we log the values that are commented out after the console.log statement? function* startGame() {
asked
Mar 10, 2024
javascript-interview-questions-answers
0
votes
1
answer
What's the output? console.log('' + '');
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? const name = 'Lydia Hallie'; console.log(name.padStart(13)); console.log(name.padStart(2));
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? console.log(Number(2) === Number(2)); console.log(Boolean(false) === Boolean(false));
asked
Mar 10, 2024
javascript-interview-questions-answers
0
votes
1
answer
What's the output? // index.js console.log('running index.js'); import { sum } from './sum.js'; console.log(sum(1, 2));
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
With which constructor can we successfully extend the Dog class? class Dog { constructor(name)
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? [1, 2, 3, 4].reduce((x, y) => console.log(x, y));
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
const value = { number: 10 }; const multiply = (x = { ...value }) => { console.log((x.number *= 2)); };
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? let num = 10; const increaseNumber = () => num++; const increasePassedNumber = number => number++;
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? const settings = { username: 'lydiahallie', level: 19, health: 90, };
asked
Mar 10, 2024
in
JavaScript
javascript-interview-questions-answers
0
votes
1
answer
What's the output? const person = { name: 'Lydia' }; Object.defineProperty(person, 'age', { value: 21 });
asked
Mar 9, 2024
in
JavaScript
javascript-interview-questions-answers
Page:
« prev
1
...
31
32
33
34
35
36
37
38
39
40
41
...
123
next »
...