Friend codes are obsolete. They were unique per-console identifiers used for online play on the original DS/DSi. Modern Nintendo systems (3DS, Switch) use Nintendo Network IDs and friend lists instead.
Note: Nintendo Wi-Fi Connection service was discontinued in May 2014. Online features for original DS games no longer function officially. For modern online play, use a 3DS or Switch.