if else statement for buttons when clicked?
Hello, im trying to shorten the code so i thought of making same points as single function (for home and guest in basketball) which will add to the respective scores based on the button click. i dont know where i went wrong, any help is much appreciated
13 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
this is what i did. its working. pls let me know if this can be improved @webcat || π§Άπ
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
sorry if the question is basic but how would i do that? im new to coding @webcat || π§Άπ
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
this looks bit complex for me , i googled factory function but i dont know how to implement it
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
but there are 6 buttons with diff values, so i have make a loop for button? when a particular button is triggered that corresponding values are passed to the function?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Yeah i will look into it and keep you posted if it worked or not @webcat || π§Άπ
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Thanks for helping me out. This looks promising, i will try to implement it to my requirements.
Dataset is a js inbuilt fn?
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View