+ 1

I HAVE ONE question in js?

Hi friends i have one button and with onclick it send numbers to function one and I want from function one send numbers to function two in function two have a array and i want save numbers function one inside <button onclick="function_one(1)" ><\button> Js code 👇 function_one(number) { if(.........) { function_two(numbers); } else if (.......) { function_three(number); } else return 1; } function_two(num){ var array=[]; array[num]=num; return array; } function_three(x){ var array=[]; array[x]=x ; return array; } ------------------------------------------------------ my friends way i have the bug??? return of function two and three undefined ?

15th Aug 2020, 8:48 AM
Mohammad Hosein Jafari
Mohammad Hosein Jafari - avatar
6 Antworten
0
Can't tell without looking at code ,but is numbers as an argument to function two in function one containing the value or is it some variable that you didn't defined ?
15th Aug 2020, 9:07 AM
Abhay
Abhay - avatar
0
Share your code plzzz
15th Aug 2020, 9:28 AM
Riyaaz
Riyaaz - avatar
0
Yes please share your code this looks interesting to me.
15th Aug 2020, 9:57 AM
arturop200
arturop200 - avatar
0
I find bugg in my code but i share my code for you
15th Aug 2020, 12:33 PM
Mohammad Hosein Jafari
Mohammad Hosein Jafari - avatar
0
Where is ur code???
15th Aug 2020, 4:08 PM
Riyaaz
Riyaaz - avatar
0
i haven't time for share my code Tomorrow shareing my code ❤
15th Aug 2020, 5:49 PM
Mohammad Hosein Jafari
Mohammad Hosein Jafari - avatar