Knowee
Questions
Features
Study Tools

What will the value of Var be in the following code snippet?var Var='var';var Var;

Question

What will the value of Var be in the following code snippet?var Var='var';var Var;

🧐 Not the exact question you are looking for?Go ask a question

Solution

The value of Var will be 'var'.

Here's the step by step explanation:

  1. In the first line, a variable named Var is declared and assigned the string value 'var'.
  2. In the second line, the variable Var is re-declared but not re-assigned, so it retains its original value 'var'.

Therefore, the value of Var remains 'var'.

Similar Questions

What is the variable in this code?

What will be the value of $var?$var = 1 / 2;Question 20Select one:a.0b.0.5c.1d.2

What is the output of following code?var a = 10;function test() { a = 20;}test();console.log(a);Options: Pick one correct answer from below1020

Which of the following is the correct way to declare a variable in JavaScript?variable name = "John";var name = "John";let name == "John";name: "John";

What will be printed?$var=’a’;$VAR=’b’;echo “$var$VAR”;Question 15Select one:a.aAb.aac.bBd.ab

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.