String.charAt(index)

2023. 5. 5. 10:52·NOTE

charAt() 함수는 문자열에서 특정 인덱스에 위치하는 유니코드 단일문자를 반환한다. 

사실 이 함수를 사용하지 않고 String[index]로도 사용할 수있다. 

const sentence = 'The quick brown fox jumps over the lazy dog.';

const index = 4;

console.log(`The character at index ${index} is ${sentence.charAt(index)}`);
// Expected output: "The character at index 4 is q"

 

'NOTE' 카테고리의 다른 글

리액트 오류: React DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node  (0) 2023.08.05
string 대문자, 소문자 체크하기  (0) 2023.05.05
배열의 두 요소 순서를 변경할 때  (0) 2023.05.05
HTTP, HTTPS의 차이  (0) 2023.04.20
[용어] 인스턴스와 프로퍼티, 메소드  (0) 2023.04.20
'NOTE' 카테고리의 다른 글
  • 리액트 오류: React DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
  • string 대문자, 소문자 체크하기
  • 배열의 두 요소 순서를 변경할 때
  • HTTP, HTTPS의 차이
ssund
ssund
  • ssund
    ssund의 기술블로그
    ssund
  • 전체
    오늘
    어제
    • 분류 전체보기 (73)
      • TECH (22)
      • NOTE (40)
      • DAILY (7)
      • javascript (1)
      • 알고리즘 (0)
  • 블로그 메뉴

    • 홈
    • TECH
    • NOTE
    • DAILY
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    Array.sort()
    slidesPerGroup
    call signatures
    웹브라우저구성
    redux
    git배포
    reduxtoolkit
    react state management
    배열요소순서
    TypeScript
    React
    reat-head
    d.ts
    styled-components
    JavaScript
    함수와 메서드차이
    theme-provider
    타입스크립트
    커머스프로젝트
    global-style
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
ssund
String.charAt(index)
상단으로

티스토리툴바