You need to sign in to do that
Don't have an account?

Call one function of js into another function of same js
If there are two javascript methods fun1() and fun2() in same LWC component, is it possible to call method fun2() from fun1() where Function fun1() gets called with click of button? If not what can be the possible workaround for this?
Yes that seems possible.
You can refere below link where question is almost similar to yours.
https://salesforce.stackexchange.com/questions/308085/how-to-call-one-function-from-another-function-in-same-javascript-file-in-lightn
Hope it helps.Please mark it as best answer so that other having same query find it useful.
Thanks!
Yes, you can call fun2() from fun1(). You can do this by using this keyword before the fun2().
Hope this explanation will resolve your query. Mark it as the best answer if you find it helpful.
Thanks
Akshay
Please follow below code:
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh