WDI Fundamentals Unit 7
myNumber. Assign it the value
After declaring the
myNumber; in the "Console" panel and hitting the return/enter key to check its value. You'll want to do this after each step.
Note: Ensure the type of this value is correct — Remember
'30'are not the same! Here we want to store a number, so make sure that there are no quotes around the value.
Reassign (update) the
myNumber variable to
+=operator to add
5to the current value of
greetingand assign (give) it the value
nameand assign it the value
sayHello. We want the variable to hold the value
"Hello Margaret". Use the variables
namealong with the
+to create this value (referred to as string concatenation).
Stuck? Check out the solutions for assistance.
Ready for another quiz? Here we go!