An ordinance is the formal written enactment of the legislative authority of a municipality in the exercise of a governmental power vested by the Constitution of statutes in the municipality for the regulation of the conduct of its citizens or others subject to its control, and intended to be of permanent duration. "By-law" and "ordinance" have substantially the same meaning.