According to the App Store guidelines, applications can't download code, and must use the built-in Javascript interpreter for Javascript execution (those are the two rules in the App Store review guidelines that are relevant to the execution of downloaded code).
In practice, though, Apple has generally accepted applications that pass user-supplied code to an interpreter, as long as that code is actually user-generated: see Pythonista (embedded Python interpreter), Continuous (embedded .NET CIL interpreter, akin to what Xamarin's doing here with Live Player), Ruby for iOS, etc.
You won't find any compiled languages (which compile down into native machine code) in the App Store, though; even ignoring the review process, there are technical restrictions in place in sandboxed iOS apps that prohibit applications from running arbitrary code.
Comments
According to the App Store guidelines, applications can't download code, and must use the built-in Javascript interpreter for Javascript execution (those are the two rules in the App Store review guidelines that are relevant to the execution of downloaded code).
In practice, though, Apple has generally accepted applications that pass user-supplied code to an interpreter, as long as that code is actually user-generated: see Pythonista (embedded Python interpreter), Continuous (embedded .NET CIL interpreter, akin to what Xamarin's doing here with Live Player), Ruby for iOS, etc.
You won't find any compiled languages (which compile down into native machine code) in the App Store, though; even ignoring the review process, there are technical restrictions in place in sandboxed iOS apps that prohibit applications from running arbitrary code.