53.7k views
0 votes
The part of the program where strFirst can be used or changed describes its

def username (strFirst, strLast):
return strFirst[0] + strLast
def username (strFirst, strLast):
return strFirst + strLast[0]
answer = username (Joann', 'Doe')
print (answer)
O value
Oneighborhood
Oscope
assignment

User Mahdaeng
by
4.7k points

1 Answer

6 votes

Answer:

Scope

Step-by-step explanation:

Variables can only be used inside the scope they are created in. The exception is global variables, which can be used anywhere.

You can use a variable in a function, but you have to pass it in through the method header:

var testVariable;

function DoSomething( var testVariable ) {

//testVariable can now be used in here as a copy

}

User JRazor
by
5.3k points