Challenger App

No.1 PSC Learning App

1M+ Downloads
What is the correct way to declare a variable in JavaScript ?

Adeclare product_name

Bvariable product_name

Cvar product_name

Dchar product_name

Answer:

C. var product_name

Read Explanation:


  • Variables are containers for storing information.
  • Creating a variable in JavaScript is called "declaring" a variable: var carName.
  • In JavaScript, variables are declared using the 'var' keyword, followed by the variable name and an optional initial value.
  • After the declaration, the variable is empty (it has no value).

Related Questions:

Which command is used to delete a table from database?
The assembly language uses symbols instead of numbers known as:
ഒരു ഹൈപ്പർ ലിങ്ക് സൃഷ്ടിക്കാൻ ഉപയോഗിക്കുന്ന HTML Tag ഏതാണ്?
The 'C' Programming language was designed by ____ as a system programming language for UNIX.
ഉയർന്ന തലത്തിലുള്ള ഭാഷകളിൽ എഴുതിയ പ്രോഗ്രാമുകൾ യന്ത്രഭാഷകളിലേക്ക് മാറ്റുന്നതിന് -------- ഉപയോഗിക്കുന്നു.