Find the error in the code.
Difficulty: Hard😤
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));What is the correct file extension for Python files?
Anonymous Quiz
5%
.python
11%
.pyt
75%
.py
9%
.pt
Which of the following elements is considered a global HTML structural element?
Anonymous Quiz
15%
<p>
62%
<header>
13%
<h1>
10%
<strong>
How do you write "Hello World" in an alert box in JavaScript?
Anonymous Quiz
13%
alertBox("Hello, world!")
15%
console("Hello, world!")
21%
print("Hello, world!")
51%
alert("Hello, world!")
How do you make each word in a text start with a capital letter in CSS?
Anonymous Quiz
39%
text-transform: capitalize;
17%
text: capitalize;
30%
text-style: capitalize;
13%
transform: capitalize;
Find the error in the code.
Difficulty: Easy😁
Difficulty: Easy😁
number = 5
text = "Quantity: " + number
print(text)
What is the correct way to create a function in Python?
Anonymous Quiz
25%
function my_function():
25%
def my_function:
40%
def my_function():
10%
create function my_function():
What is the correct HTML element for playing audio files?
Anonymous Quiz
8%
<sound>
69%
<audio>
19%
<mp3>
5%
<video>
👍2🔥1👏1
What is the correct way to write a JavaScript array?
Anonymous Quiz
73%
var colors = ["red", "green", "blue"]
12%
var colors = "red", "green", "blue"
6%
var colors = (1:"red", 2:"green", 3:"blue")
10%
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
Python Task
Write a program that asks the user to enter a number, then displays whether the number is even or odd.
Difficulty: Easy😁
Example of the program's output:
Write a program that asks the user to enter a number, then displays whether the number is even or odd.
Difficulty: Easy😁
Example of the program's output:
Enter a number: 7
The number 7 is odd.
Enter a number: 10
The number 10 is even.
👍2
👏1
Which of the following JavaScript features are used for handling asynchronous operations?
Anonymous Quiz
43%
Promises and Callbacks
14%
SetTimeout and Event Listeners
24%
Var and Let
19%
Functions and Loops
React_js_Design_Patterns_Learn_how_to_build_scalable_React_apps.pdf
3.1 MB
📒 FREE Book
React.js Design Patterns: Learn how to build scalable React appswith ease (2023)
By: Anthony Onyekachukwu Okonta
#book
React.js Design Patterns: Learn how to build scalable React appswith ease (2023)
By: Anthony Onyekachukwu Okonta
#book
🔥2❤1👍1