Question: what is atpos and dotpos in javascript?
Answer: var atpos=a. indexOf(“@”); which contain in-built function called indexOf() which will search text for us. It is used to check if mail contains @ sign. var dotpos=a. lastIndexOf(“.”);which contain in built function called lastIndexOf() which will search for dot at end of email id like .com.