.length
.length는 문자열의 길이를 반환하는 속성입니다.
기본형
string.length
예를 들어
'abcd'.length;
는 4입니다.
예제
document.write( '<p>"1234".length : ' + '1234'.length + '</p>' );
document.write( '<p>"".length : ' + ''.length + '</p>' );
document.write( '<p>"한글".length : ' + '한글'.length + '</p>' );
로딩 중... 잠시만 기다려주세요.
자바스크립트를 허용해주세요.
같이 보면 좋은 글