Multiple choice technology programming languages

Which is the best way to delete an element in an associative array?

  1. Delete

  2. Push

  3. Pop

  4. Shift

  5. Unshift

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The delete function is specifically designed to remove a key-value pair from a hash (associative array). push/pop/shift/unshift are array operations that don't apply to hashes. delete is the correct and idiomatic way to remove hash elements.