evaluateJavascript not able to run script containing string interpolation

Hi Everyone, I am integrating ace editor in swift using WKWebview and injecting JS in WKWebview using evaluateJavascript function and its returning an error saying "A JavaScript exception occurred". This is only happening when my JS script contains string interpolation. Please find the code below.

let script = "var content = String.raw` <script>\n// String Interpolation\nfunction myInfo(fname, lname, country) {\n    return `My name is ${fname} ${lname}. ${country} is my favorite country`; \n}\nconsole.log(myInfo(\"john\", \"doe\", \"India\"));\n</script>`; editor.setValue(content);"

webview.evaluateJavaScript(script) { (response, error) in 
}

Thanks for help in advance!

evaluateJavascript not able to run script containing string interpolation
 
 
Q