Seeking guidance on how to evaluate a JavaScript string within iOS using the code snippet:
[self.webView stringByEvaluatingJavaScriptFromString:formula]
The current code in question:
NSString *formula = @"( 1.5 * Math.pow(2, 3) ) / 12";
formula = [NSString stringWithFormat:@"eval('%@')", formula];
NSInteger value = [[self.webView stringByEvaluatingJavaScriptFromString:formula] integerValue];
Encountering an issue with the Math.pow function - when included in the string, it returns an empty result instead of a numeric one from the webView output. In need of assistance to modify the code to successfully handle strings containing Math.pow.