Jump to content

Need Help learning about Combinations (not permutations) in JS


DocGrimwig

Recommended Posts

I have been trying to apply the theory of recursion to practical application within a JS function. At first I thought it would be easy. I have found several attempts, but most are all over the place and it's hard to follow them and to learn something from them. I have spent days with others, only to discover they are not using proper JS protocols. Can anyone link me to a GREAT Word Combination (recursive, repeating) -permutations, JS function that finds all of the combinations of an input word and displays them in the browser? I am so new that I can't tell what's good or what's bad.

 

Thanks!

Doc

Link to comment
Share on other sites

That's a pretty specific request. I'm not sure I understand, it doesn't sound like you would need recursion for that. The classical example of recursion is a factorial function though, that's about as basic as it gets even though the real-world application is pretty limited. A real-world example of recursion is to print out an entire directory structure. In a Javascript context, you could start with a JSON structure representing the directory rather than reading the structure straight from disk. You could even have PHP generate that JSON structure based on your actual file structure, which will use recursion in PHP also.

Link to comment
Share on other sites

I suppose if they can help you, then learn them. I don't use Angular, I'm not a huge fan of basically using another language to try and abstract something that doesn't really need to be all that abstract. Bootstrap is fine to learn if you're trying to make device responsive sites.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...