Coding Quiz Zone
前往频道在 Telegram
✨ Part Of @OfficialCodingExpert Dive into the world of computer science, programming, and coding challenges. Sharpen your skills, expand your knowledge, and embark on a journey of continuous learning. Stay tuned for daily quizzes!
显示更多1 545
订阅者
-124 小时
-27 天
-230 天
帖子存档
1 545
const numbers = [1, 2, 3, 4, 5];
const [first, ...rest] = numbers;
rest.push(6);
console.log(numbers);
console.log(rest);
06 7月 2024, 04:32
06 7月 2024, ~04:33
1 545
What will be the output of the following code?
Code let a = [1, 2, 3]; let b = a; a = [4, 5, 6]; console.log(b);
06 7月 2024, 04:31
1 545
What will be the output of the following code?
Code console.log(typeof NaN);
06 7月 2024, 04:28
1 545
Which of the following methods can be used to add an element to the end of an array?
06 7月 2024, 04:26
1 545
What will be the output of the following code?
Code let a = [1, 2, 3]; let b = [1, 2, 3]; console.log(a == b);
06 7月 2024, 04:25
1 545
How do you write an if statement in JavaScript?
06 7月 2024, 04:20
1 545
What is the correct syntax for referring to an external script called "script.js"?
06 7月 2024, 04:18
1 545
function outer() {
let x = 20;
function inner() {
x++;
let x = 30;
console.log(x);
}
inner();
}
outer();06 7月 2024, 04:13
1 545
Question: Which OOP concept is demonstrated by the ability of different classes to define the same method, such as makeSound(), but with different implementations?
06 7月 2024, 03:52
1 545
class Animal {
public void makeSound() {
System.out.println("Animal sound");
}
}
class Dog extends Animal {
public void makeSound() {
System.out.println("Bark");
}
}
public class Main {
public static void main(String[] args) {
Animal myDog = new Dog();
myDog.makeSound();
}
}
06 7月 2024, 03:51
06 7月 2024, ~03:51
1 545
Question: Which keyword is used in Java to define a constant value that cannot be changed once assigned?
06 7月 2024, 03:04
1 545
return {
bar: "hello"
};
}
function baz() {
return
{
bar: "hello"
};
}
console.log(foo().bar);
console.log(baz().bar);05 7月 2024, 07:39
1 545
const person = {
name: "Alice",
age: 25
};
Object.freeze(person);
person.age = 30;
person.city = "New York";
console.log(person.age);
console.log(person.city);05 7月 2024, 01:05
1 545
Which of the following is a valid declaration of a boolean variable in Java?
05 7月 2024, 00:24
1 545
console.log(message);
var message = "Hello, World!";
console.log(message);
}
sayHello();04 7月 2024, 13:24
