set header names through java script array

Hi ,
i am trying to set header through xyx.js file to the grid instead of hardcode it like grid.setHeader(“Column A”, “Column B”), is it possible?? thanks in advance

???