Use what it gives back · ใช้สิ่งที่มันส่งกลับมา
Use what it gives back
double is written for you and returns a number. Call it with 21 and store the answer in answer.
return hands a value back to whoever called the function. That value is not printed — you catch it with =, exactly like any other result.
ใช้สิ่งที่มันคืนกลับมา
double ถูกเขียนไว้แล้วและ ส่งกลับ ค่า عدد เรียกมันด้วย 21 และเก็บคำตอบลงใน answer
return ส่งค่ากลับไปยังผู้เรียกฟังก์ชัน ค่านั้นไม่ได้ถูกพิมพ์ — คุณจับมันได้ด้วย = เหมือนผลลัพธ์อื่นๆ ทั่วไป
double is written for you and returns a number. Call it with 21 and store the answer in answer. · double ถูกเขียนไว้แล้วและ ส่งกลับ ค่า عدد เรียกมันด้วย 21 และเก็บคำตอบลงใน answer
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่