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
737
Subscribers
+324 hours
+87 days
+2830 days
Posts Archive
What will this code output? Spot the bug. Difficulty: Average🤨
const obj = {
    value: 42,
    getValue: function() {
        setTimeout(function() {
            console.log(this.value); 
        }, 1000);
    }
};

obj.getValue();

Which type of Developer you are?
Anonymous voting

Find errors in the code. Difficulty: Average🤨
function bubbleSort(arr) {
    let n = arr.length;

    for (let i = 0; i < n - 1; i++) {
        for (let j = 0; j < n - i - 1; j++) {
            if (j > arr[j + 1]) {
                let temp = j;
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }

    }
    return arr; 
}

const numbers = [64, 34, 25, 12, 22, 11, 90];
const sortedNumbers = bubbleSort(numbers);
console.log("Sorted array:", sortedNumbers);

Which attribute of the
tag is used to specify the URL to which the form data will be sent when it is submitted?
Anonymous voting

JavaScript Task Get an array of letters from this string. Difficulty: Easy😁
const str = 'abcde';

How can you make a text bold in CSS?
Anonymous voting

What is the result of 5 + "5" in JavaScript?
Anonymous voting

Find errors in the code. Difficulty: Impossible😈
class User {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }

    getProfile() {
        return Name: ${name}, Age: ${this.age}; 
    }

    isAdult() {
        return this.age > 18 ? "Yes" : false; 
    }

    updateProfile(newName, newAge) {
        if (newAge < 0) {
            throw "Age can't be negative"; 
        }
        this.name = newName ?? this.name; 
        this.age = newAge || this.age;
    }
}

const user = new User("John", 25);

console.log(user.getProfile());?2
user.updateProfile("", -5);

Which of the following is the correct way to comment in HTML?
Anonymous voting

Which method can be used to convert a string to a number?
Anonymous voting

JavaScript Task Fill the array with random numbers from 1 to 100. Difficulty: Easy😁
console.log(randomNumbers);

Which attribute is used to specify the URL in an img tag?
Anonymous voting

In React, how do you pass data from a parent component to a child component?
Anonymous voting

Find the error in the code. Difficulty: Easy😁
let fruits = ['apple', 'banana', 'orange'];

for (let i = 0; i <= fruits.length; i++) { 
    console.log(fruits[i]);
}

What is the purpose of the rel="preload" attribute in a tag?
Anonymous voting

What is the purpose of the CSS pseudo-class ":first-child"?
Anonymous voting

JavaScript Task Display the following pyramid Difficulty: Average🤨
1
22
333
4444
55555
666666
7777777
88888888
999999999

How do you handle asynchronous operations in JavaScript?
Anonymous voting

What is the difference between relative and absolute positioning in CSS?
Anonymous voting

Find the error in the code. Difficulty: Hard😤
function processArray(arr) {
    let result = [];
    
    arr.forEach(item => {
        if (item != '') { 
            result.push(item);
        } else if (typeof item === 'number') { 
            result.push(item * 2);
        }
    });

    return result;
}

let data = [1, '', 2, 3, '', 5, null, undefined, 'hello'];

console.log(processArray(data));