Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

What is the correct way to declare a JavaScript variable?

View

Which of the following is NOT a JavaScript data type?

View

How do you create a function in JavaScript?

View

Which symbol is used for single-line comments in JavaScript?

View

What is the output of the following code snippet?

View

How do you write "Hello World" in an alert box in JavaScript?

View

What is the result of 2 + "2" in JavaScript?

View

Which of the following methods can be used to find the length of a string in JavaScript?

View

Which of the following statements will throw an error?

View

How do you check if two values are equal in JavaScript, including both value and type?

View

What is the correct way to declare a JavaScript variable?

var myVariable
variable myVariable
v myVariable
let variable

Which of the following is NOT a JavaScript data type?

String
Boolean
Undefined
Float

How do you create a function in JavaScript?

function: myFunction()
function = myFunction()
function myFunction()
func myFunction()

Which symbol is used for single-line comments in JavaScript?

<!-- -->
//
/* */
#

What is the output of the following code snippet?

<pre>console.log(typeof(null));</pre>

null
undefined
object
number

How do you write "Hello World" in an alert box in JavaScript?

alertBox("Hello World");
msg("Hello World");
alert("Hello World");
msgBox("Hello World");

What is the result of 2 + "2" in JavaScript?

22
4
NaN
Error

Which of the following methods can be used to find the length of a string in JavaScript?

length()
size()
count()
length

Which of the following statements will throw an error?

let x = 10;
const y = 15;
y = 20;
var z = 5;

How do you check if two values are equal in JavaScript, including both value and type?

==
===
=
!==