Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- formgroup
- Oracle LISTAGG 사용 예시
- 앵귤러 모달
- flex-1
- TAILWIND
- angular animation
- 앵귤러 애니메이션
- 모달
- 셀렉트박스 커스텀
- summary
- mysql if
- Ionic modal
- ajax 사용 예시
- prisma
- 옵저버블
- modal
- angular modal
- 스크롤 이벤트
- Router
- route
- ApexChart
- egov spring ajax 사용 예시
- 아이오닉 스크롤 이벤트
- angular route
- Angular Router
- angular button
- 스크롤 이벤트 감지
- scroll
- 호버
- 검색
Archives
- Today
- Total
깜놀하는 해므찌로
StringMap 활용 간략 예시 본문
반응형
SMALL
const stringMap: Record<string, string> = {
MASTER: '마스터',
CONSULTANT: '컨설턴트',
ETC: '기타',
ADMIN_PENDING: '승인대기',
ADMIN_APPROVED: '승인',
ADMIN_BLOCKED: '차단',
};
console.log(stringMap.MASTER); // Output: "마스터"
console.log(stringMap.CONSULTANT); // Output: "컨설턴트"
console.log(stringMap.ADMIN_APPROVED); // Output: "승인"
// You can access the values by using the corresponding key in the object.
// You can also iterate over the keys and values in the object:
for (const key in stringMap) {
if (Object.prototype.hasOwnProperty.call(stringMap, key)) {
const value = stringMap[key];
console.log(`Key: ${key}, Value: ${value}`);
}
}
반응형
LIST
'IT' 카테고리의 다른 글
@Prisma Client 활용 예시 / type (0) | 2023.08.10 |
---|---|
Nx Angular Lib 생성 및 활용 (0) | 2023.08.09 |
Github action deploy 깃허브 액션 배포 예시 (0) | 2023.08.07 |
Github Action Deploy 배포 시 이미지 파일 크기로 인한 오류 해결 (0) | 2023.08.06 |
Open Gragh 오픈 그래프 / 카카오 url 전송 시 사이트 설명 보이도록 설정하기 예시 (0) | 2023.08.05 |