NCl3= molecular compound
NaBr = ionic compound
molecular compound is formed when two non metals form a bond by sharing electrons
in NCl3 electrons are shared to each other
ionic compound is formed when a metal and a non-metal form a bond by losing and gaining of electrons
In NaBr Na is the metal while Br is the non -metal. Na loses electrons while Br gain electrons