More easily, you can just enter a unique class name on the admin menu page /wp-admin/nav-menus.php
. You may need to look in the top right corner of the page for “Screen Options” and then enable CSS Classes. Then edit any menu item and add the class.