JS 노트 (문자열 속 문자찾기)

주재일·2021년 5월 15일
const word = "pineapple is yummy";

const value = word.indexOf("apple");

console.log(value);

apple이 숨어있네용?? 어디있죠??? 4번째부터 있네요 ㅎㅎㅎ

출력 값 : 4;

profile
늦게 시작했으니 저는 늦둥이인가요?

0개의 댓글