98.7k views
3 votes
Var x = 50; var y = 15; What is the value of the y variable?

1 Answer

2 votes

Answer:

The variable y is declared in JavaScript and assigned a value of 15. The value assigned is an integer. The value of y variable is definitely 15.

Step-by-step explanation:

What you wrote is a representation of a JavaScript code. A variable is declared with the keyword var in JavaScript. A variable must have a unique name

In programming terms a variable is a container for storing a value . One can assign a value to a variable using an equal to sign (=) in JavaScript's.

var x = 50;

var y = 15;

The variable x is declared in JavaScript and assigned a value of 50 . The value assigned is an integer. The semi colon (;) is used to end statements in JavaScript. It is not compulsory to end statement with semi colon but it is recommended.

The variable y is declared in JavaScript and assigned a value of 15. The value assigned is an integer. The value of y variable is definitely 15.

User Shathur
by
3.5k points