Lenght Check in JavaScript

string.length
Thyago Mac