136k views
2 votes
N the diagram below, why is var typed first in front of pizza?

N the diagram below, why is var typed first in front of pizza?-example-1
User Addisonj
by
4.3k points

1 Answer

7 votes

Answer:

var is used to initialize the pizza variable

Step-by-step explanation:

In order to create a variable, you first have to intiialize he variable.

This is the syntax to intiailize the variable:

var variableName

Thus, to initialize the pizza variable, you would do:

var pizza

Once you initialize the variable, you can then assign values to the variable.

pizza <- 3

Here, the value 3 is assigned to the pizza variable.

User Shuvo Joseph
by
3.8k points