Question

Fill in each column with the value of the vari- able after each line of code has run. If the vari- able has not been declaredneed explanation thx

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

Answer

let x: number = 15; let yż number: x = x + 8; let z: number = 9; y = x+z; 15 ? 15 * 23 * 23 23 32 ? ? ? 9

Explanation

let x: number = 15; 15 ? ?

in this statement x is declared and initialized to 15

so we write

x=15

but y and z not declared and initialized so we write "?"

---

15 ? ? let x: number = 15; let y: number, 15

in this statement we declare y but not initialized so we write "*

---

let x: number = 15; let y: number: x = x+8; 15 ? 15 * ? ? 23

in this statement now we are adding value 8 to the value of x

x=15+8

x=23

y already declared, z still not declared

---

let x: number = 15; let y: number; x = x+8; let z: number = 9; 15 ? 15 * 23 * 23 * ? ? ? 9

now z is declared and initialized

so write 9 in z

please note y still not initialized

---

15 ? * ? ? Tev y. number, 15 let x: number = 15; let y: number; x = x + 8; let z: number = 9; y = x+z; 23 * 23 * 23 32 ? 9 9

now we are adding value of x and z storing in y

so y=23+9

y=32

---

all the best

Add a comment
Know the answer?
Add Answer to:
need explanation thx Fill in each column with the value of the vari- able after each...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT