How to test kolichesvto of characters in the string?

Please tell me how to check the number of characters and if they are for example more than 6 to attachit a new class of floating point is also considered a symbol?
July 2nd 19 at 14:12
2 answers
July 2nd 19 at 14:14
Solution
the point is also considered a symbol

https://jsfiddle.net/j8qt948y/2/
July 2nd 19 at 14:16
Solution
[].forEach.call(document.getElementsByClassName('num'), function(element) {
 if (element.textContent.length > 6) {
element.classList.add('someclass');
}
});

Find more questions by tags jQuery