var comp_width = thisComp.width;
var comp_height = thisComp.height;
/**
* Apply to the Size property of a rectangle shape layer
* This will automatically size a rectangle to the comp size
**/
var comp_width = thisComp.width;
var comp_height = thisComp.height;
[comp_width, comp_height];
Apply the following expression to the position property of a layer:
var centre_x = thisComp.width / 2;
var centre_y = thisComp.height / 2;
[centre_x, centre_y];