In my JavaScript I want to check whether the element with specific id is exist or not, I tried it with 2 ways
1).
var myEle = document.getElementByI
Use typeof for elements checks.
if(typeof(element) === 'undefined') { // then field does not exist }