How do I restrict a javascript code from mobile devices

james_umphres
Community Novice

Sorry if I'm phrasing this in a confusing way. Is there a way to restrict a block of javascript code and keep it from loading on mobile devices? There are about 4 lines that I don't want to show up on the mobile app.

Thanks for your help.