Appropriate use of variables... to avoid duplicating them in the code

Hi

When i get to have in a matrix props field :

JS{
var this
var that
var hmm
var okay
... a lot of var ...

/////////////////////
lot of props...
/////////////////////

props.onValue : `
var this
var that
var hmm
var okay
... a lot of var ...

... code ...

I wonder what would be more convenient to avoid duplicate lines this way...
Is it the setVar in the matrix itself ?...
Is it a widget variable ?...
Or something else ?

Thank you