"JavaScript 문자열 startsWith()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
3번째 줄: 3번째 줄:
;자바스크립트 startsWith()
;자바스크립트 startsWith()


<source lang='JavaScript'>
<syntaxhighlight lang='JavaScript'>
var str = "Hello world!";
var str = "Hello world!";
console.log( str.startsWith("Hello") ); // true
console.log( str.startsWith("Hello") ); // true
9번째 줄: 9번째 줄:
console.log( str.startsWith("ll") ); // false
console.log( str.startsWith("ll") ); // false
console.log( str.startsWith("ll", 2) ); // true
console.log( str.startsWith("ll", 2) ); // true
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:54 판

1 개요

JavaScript startsWith()
자바스크립트 startsWith()
var str = "Hello world!";
console.log( str.startsWith("Hello") ); // true
console.log( str.startsWith("He") ); // true
console.log( str.startsWith("ll") ); // false
console.log( str.startsWith("ll", 2) ); // true

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}