Imperative Statement

An imperative statement describes the new state of the program as a modification of the old. list.push('foobar') tells the program that list is now whatever was there before, but with 'foobar' on the end of it. The order these statements execute relative to other imperative statements affects their outcome. If the statements list.push('foobar') and list.sort() exist in a program, the result of their execution will depend on timing—referred to as Control. Imperative statements should be used for one of two reasons. First, to store new Information while retaining existing Information. Second, to cope with performance issues.