How to pass a variable string inside elementsByAndroidUIAutomator

I’m using nodejs webdriver
I need appium to find element with text containing “Hello world”

Below is my code:

var textName = “Hello world”
return this.driver.elementsByAndroidUIAutomator(‘new UiSelector().textContains(""+textName+"")’);

Below code should work to find an element which contains text in variable partialText -

findElementByAndroidUIAutomator(“new UiSelector().textContains(”"+partialtext+"")")

In your code, couple of differences are -
Single quote in place of doubleQuote
elements in place of findElement