I'm trying to convert an Object to String in JavaScript to do some String Manipulation. This is my code:
var userName=String(userInfo.email);//regular email like [email protected]
var atIndex=userName.indexof("@");
I got the following error:
TypeError: Object [email protected] has no method 'indexof'
What I'm doing wrong?
Thanks,