Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

slice string javascript if has @

let email = 'john@example.com'
let localPart = email.slice(0,email.indexOf('@'));
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #slice #string #javascript
ADD COMMENT
Topic
Name
2+9 =