Click here to Skip to main content
15,906,816 members

Comments by VaiShankar (Top 6 by date)

VaiShankar 8-Oct-18 21:06pm View    
Tysm. I got the output! But every combination isn't getting separated by a [ ]. Like which i enter a,b. The output should be [a,b],[b,a]. Instead, I am getting a,b,b,a. So I used document.write(JSON.stringify(permute(vals))). This prints the output into a new blank page and not at the bottom of the textbox and button. I updated the code in the question. Please check the 2nd function.
VaiShankar 8-Oct-18 18:59pm View    
I'm sorry. I just did what you said. No output is being printed. It says failed to load resources, favicon.ico:1 404 not found in chrome. I have updated the above code for reference.
VaiShankar 8-Oct-18 18:13pm View    
Thanks for reply. Yes, I want to split by commas. But in onClick, what code should I write? Where should I write code to accept input from textbox? I am new to javascript. I am trying my best to understand. Sorry if my question sounded too dumb.
VaiShankar 8-Oct-18 11:00am View    
Yes. i have used input id for both the textbox and button(with onclick permute()) in the html file.
VaiShankar 7-Oct-18 11:32am View    
Thank you so much. I got the output :)