The E model had a gun. You could also hang a gun pod on any hard mount. Actually witnessed one with 5 gun pods hung on it. Rumor was you could not fire them all at once or you would stall.
Mr .McDonnell and his engineers wanted to put guns om the F4
from the beginning but the Navy brass refused and insisted that
guns were obsolete and that missiles were the future.
F8 Crusaders had the better early record vs. the MiGs.