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 | 29 | 30 |
Tags
- Session
- HTML
- TypeScript
- react
- heroku
- Mongoose
- node.js
- backend
- form
- ES6
- nodejs
- MongoDB
- graphQL
- Flutter
- clonecoding
- 리액트
- 자바스크립트
- DART
- API
- pug
- ECMAScript
- CSS
- JavaScript
- frontend
- javscript
- express
- GRID
- NextJs
- Component
- CLONE
Archives
- Today
- Total
목록Value (1)
Enjoy Programming
[javascript] value의 grade 지정하기
export function getGrade({ gradeList, value }: { gradeList: number[]; value: number }) { let grade = 0; gradeList.some((g, index) => { if (g === value) { grade = index; return true; } return false; }); return grade; } ex gradeList = [0,1,2,3,4,5,....] , value = 3.5 , grade = 2 그냥 남기는 용도... ㅋ 요새 뭘했는지 쓸게 많은데 문득 생각나서 남김...
JavaScript/Node.JS
2023. 5. 1. 21:28