insert the value of a local variable

I have this

layer.scroll\_ftec:insert(layer.myimage) 

Now I would like that myimage get the value of a variable named myvar

then I write for example

local myvar = "flog" layer.scroll\_ftec:insert(layer.myvar) 

How can I get that after (layer.

get the value of the variable named myvar   ?

Declare ‘local myvar’ as a forward reference outside of the function where you are defining and inserting it.

Declare ‘local myvar’ as a forward reference outside of the function where you are defining and inserting it.