![article thumbnail image](https://blog.kakaocdn.net/dn/ucTyS/btrSXo8RbbR/spPiO9qLtl9HV9fpewR4aK/img.png)
호우 정식타건법으로 타이핑을 치려니까 빨라지는 것 같지도 않고 참...
진짜 자신과의 싸움이다...
나는 독수리타법을 교정 할 수 있다!!!!!!
자 그럼 subString 을 어떻게 사용하는지 바로 들어가보자
![](https://t1.daumcdn.net/keditor/emoticon/friends1/large/040.gif)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
String.prototype.substring() - JavaScript | MDN
The substring() method returns the part of the string from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.
developer.mozilla.org
(JavaScript SubString Usage)
Method
const str = 'Mozilla';
console.log(str.substring(1, 3));
// expected output: "oz"
console.log(str.substring(2));
// expected output: "zilla"
1, 3 의 경우에는
1이상 3미만으로 알면된다.
그리고 배열은 꼭 첫번째 글자는 0번째 글자 라는것을 잊지말아야한다.
subString(2) 의 경우에는
2번째 의 숫자도 포함하여 나타내는 것을 말한다.
To be continue..
'Front > JavaScript' 카테고리의 다른 글
[JavaScript] 자바스크립트 프레임워크 종류와 순위 (0) | 2022.12.08 |
---|---|
[JavaScript] 자바스크립트의 종류 (0) | 2022.12.08 |
[JavaScript] 자바스크립트 스코프에 대한 개념 (0) | 2022.12.06 |
[JavaScript] 자바스크립트 클래스형과 함수형 (0) | 2022.12.06 |
[JavaScript] 자바스크립트 Click 이벤트 사용 방법 (0) | 2022.12.05 |