Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29745

Trunc mail address in js [duplicate]

$
0
0

This question already has an answer here:

I need to remove what is after the @ in an email address in a javascript var like that: exemple@mail.com to exemple for example, how I can make that because I have seen the function

Math.trunc()

But to replace the user.DisplayName by the truncated email with in my code :

var user = user.DisplayName;
var email = user.email;
 if (user === null ) {
   //truncate email (user.email) 
   $(user).text(displayName);
  }
 else {
   //...
  }

Viewing all articles
Browse latest Browse all 29745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>