How can I create/use a global variable in a function
If I create a global variable in one function, how can I use that global variable in another function?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dipa MehtaRank #361 · 6.9K reputationPosted Nov 20, 2019, 3:41 AM EST
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Nov 20, 2019, 3:38 AM EST
Edinbiro JamesRank #897 · 2.4K reputationPosted Nov 23, 2019, 9:51 PM EST
Sagar LadRank #523 · 4.7K reputationPosted Aug 19, 2021, 11:00 AM EDT