I need a function in Javascript that takes in a String like this:
var str = '2?5?8?1?4?7?9?2?3'
and generates all possible combinations of the riddle with all question marks being substituted with basic mathematical operators (+-*/).
How would you go about that? And how would you do it for a dynamic length of riddles?