UF-B is for outdoor use, whereas NM-B is suitable for indoor use. UF-B does not get damaged quickly in rough weather with its special exposure protection. But NM-B will get damaged if placed on the exterior.