Here is a simple example of what I want to be able to do.
I want a function returnFunctions which will take an integer N as an argument and will define the following functions:
func1(x) = x
func2(x) = 2*x
...
funcN(x) = n*x
How can I do something like this in javascript?
You can do like this:
Demo: http://jsfiddle.net/Guffa/H4juA/
However, it’s not at all certain that it’s the best solution for what you are trying to accomplish, but the question doesn’t contain any information about that…