en
Feedback
Programming Quiz Channel

Programming Quiz Channel

Open in Telegram

Programming quizzes and knowledge tests Short quizzes on programming, logic and computer science. Test and improve your coding knowledge. Join 👉 https://rebrand.ly/bigdatachannels DMCA: @disclosure_bds Contact: @mldatascientist

Show more
781
Subscribers
-124 hours
+37 days
+1730 days
Posts Archive
Which of the following is NOT a valid JavaScript variable name?
Anonymous voting

#cheatsheet
#cheatsheet

Which statement is used to execute a function in JavaScript?
Anonymous voting

Find the error in the code. Difficulty: Easy😁
function greet(name) {
  console.log("Hello, " + name);
}

greet();

What does HTML
tag represent?
Anonymous voting

#JavaScript #methods #cheatsheet
#JavaScript #methods #cheatsheet

Which property is used to change the text color in CSS?
Anonymous voting

Find the error in the code. The answer should be: 0, 1 Difficulty: Average😐
const createCounter = () => {
  let count = 0;
  return () => {
    console.log(count++);
  };
};

const counter1 = createCounter();
const counter2 = createCounter();

counter1(); 
counter2();

What is the main difference between the "==" and "===" operators in JavaScript?
Anonymous voting

#html #status
#html #status

How can you select all the elements with class "example" in CSS?
Anonymous voting

TEST Write a calculator in JavaScript with minimal code Difficulty: Easy🙂
function calculate(expression) {
    try {
        let result = eval(expression);
        if (isNaN(result)) {
            throw new Error("Invalid expression");
        }
        return result;
    } catch (e) {
        return "Error: " + e.message;
    }
}

let userInput = prompt("Enter an arithmetic expression (for example, 2 + 2):");

if (userInput !== null) {
    console.log("Result:", calculate(userInput));
}

Which HTML tag is used to create a horizontal line?
Anonymous voting

#html #cheatsheet
#html #cheatsheet

Which CSS property is used to make text bold?
Anonymous voting

How can the code be modified to handle both successful and failed promises? Difficulty: Impossible😈
const promises = [
  Promise.resolve(1),
  Promise.reject(new Error('Error'))
];

Promise.all(promises)
  .then(results => console.log(results))
  .catch(error => console.error(error));

What is the purpose of the "else" statement in JavaScript?
Anonymous voting

#skills
#skills

Which CSS property is used to control the transparency of an element?
Anonymous voting

Find the error in the code. The answer should be: 15 Difficulty: Average😐
function sumArray(arr) {
    let sum = 0;
    arr.forEach(function(num) {
        sum =+ num;
    });
    return sum;
}

let numbers = [1, 2, 3, 4, 5];
console.log(sumArray(numbers));