Ask Your Question
0

Is it possible to transfer the input parameter from function 1 to function 2, without directly passing it as an input to function 2?

asked 2023-05-05 03:44:47 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-05 04:08:02 +0000

david gravatar image

Yes, it is possible to transfer the input parameter from function 1 to function 2 without passing it directly as an input to function 2. This can be done by using a global variable or by returning the value from function 1 and then passing it as an input parameter to function 2. However, it is generally considered better programming practice to avoid global variables and to pass input parameters directly to functions, as it makes the code more explicit and easier to understand.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-05 03:44:47 +0000

Seen: 8 times

Last updated: May 05 '23