bfth.bsky.social
@bfth.bsky.social
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that the array is sorted numerically rather than lexicographically?

#javascript #coding #array #sort #question
April 26, 2025 at 12:15 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that both function calls work without causing an error?

#javascript #coding #hoisting #functions #question
April 20, 2025 at 9:23 AM
Coding Question

What will be printed to the console when the following code is executed?

How can you modify the third expression so that the {} is treated as an object literal rather than as a block statement?

#javascript #coding #typeCoercion #question
April 14, 2025 at 8:12 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why the length of the array remains unchanged after using the delete operator, and how you can modify the code to remove the element entirely from the array.

#javascript #coding #array #delete
April 10, 2025 at 11:49 AM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How do variable declarations and assignments affect scoping in this code?

#javascript #coding #variableScoping #question
April 6, 2025 at 4:46 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain the behavior of generator functions regarding the done and value properties of the iterator result. How does the return statement inside a generator affect its iteration?

#javascript #coding
April 2, 2025 at 4:25 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that the result is [10, 10, 10]?

#javascript #coding #parseInt #map #question
March 31, 2025 at 10:29 AM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How do block scoping and the temporal dead zone affect this code?

#javascript #coding #let #scoping #question
March 27, 2025 at 9:22 AM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that a custom property can be stored on the string?

#javascript #coding #primitives #question
March 23, 2025 at 2:20 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why the property "foo" is included in the iteration. How can you modify the code to iterate only over the array's numeric indices?

#javascript #coding #forin #array #question
March 20, 2025 at 10:18 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the arrow function to access its arguments?

#javascript #coding #arguments #arrowfunctions #question
March 19, 2025 at 4:37 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that changes to the copied object do not affect the original object?

#javascript #coding #objectCopy #question
March 17, 2025 at 9:30 AM
Coding Question

What will be printed to the console when the following code is executed?

Explain why the outputs differ. What is the difference between the logical OR operator (||) and the nullish coalescing operator (??) in this context?

#javascript #coding #nullishCoalescing #question
March 10, 2025 at 7:14 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that the default values work as intended?

#javascript #coding #defaultParameters #question
March 6, 2025 at 10:47 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why the output is as shown. How can you access the symbol-keyed property using standard object property access?

#javascript #coding #symbol #question
March 5, 2025 at 9:54 AM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you reliably check if a value is NaN?

#javascript #coding #NaN #question
March 3, 2025 at 12:15 AM
What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that both functions print the object's value?

#javascript #coding #this #arrowfunctions #question
March 1, 2025 at 10:08 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that both calls to test() produce the same result?

#javascript #coding #regex #question
February 27, 2025 at 11:04 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How can you modify the code so that when calling foo({ a: 100 }), the parameter b defaults to 20?

#javascript #coding #destructuring #defaultParameters #question
February 26, 2025 at 11:37 PM
What will be printed to the console when the following code is executed?

Explain why this behavior occurs. How does returning a primitive value in a constructor function affect the created object?

#javascript #coding #constructor #this #question
February 25, 2025 at 11:29 PM
Coding Question

What will be printed to the console when the following code is executed?

Explain why this behavior occurs.
February 25, 2025 at 12:07 AM
Coding Question

What will be printed to the console when this code is executed? Explain why this behavior occurs. How can you modify the code so that the counter increments correctly and prints the updated count after 1 second?

#it #coding #programming #question #js #ts
February 22, 2025 at 9:09 AM
Coding Question

What will be printed to the console when the following code is executed?

Why does this behavior occur? How can you modify the code so that the function delayedGreet prints "Hi, Alice"?

#it #coding #programming #js #ts
February 20, 2025 at 9:12 PM
Coding question

What will be printed in the console when you run this code?

Why does this happen? How can you modify the code so that different object keys store separate values?

#it #coding #programming #javascript #object #js
February 18, 2025 at 8:36 PM
Coding question

What will be printed in the console and in what order?

#it #programming #coding #javascript #async
February 17, 2025 at 8:04 PM