[JDP-6] Enhanced to also support var declarations