Complex sentence: The office was in existence from 1781 to 1788, under the Articles of Confederation, and was replaced by the modern office of President of the United States when the Constitution took effect in 1789.
Split into simpler sentences: The office was in existence from 1781 to 1788, under the Articles of Confederation. It was replaced by the modern office of President of the United States when the Constitution took effect in 1789.