Cognizant Interview Question

Write a code for validation using javaScript for a input id(length atleast seven) ?