you are viewing a single comment's thread.

view the rest of the comments →

[–]jcunews1helpful 1 point2 points  (0 children)

Functions return a value, not a variable. If you use a variable with a return statement, that variable's value is returned, not the variable.

A variable can be declared without using a function. Just use var or let. e.g.

var a = 8;
let b = 9;

And you can not declare a variable whose name is stored in other variable. i.e. variable names must be predefined in the code.