(a) A man or woman commits the crime of abandonment of a child when, being a parent, guardian or other person legally charged with the care or custody of a child less than 18 years old, he or she deserts such child in any place with intent wholly to abandon it.
(b) Abandonment of a child is a Class A misdemeanor.