Bài viết 25
Hỏi & Đáp
혹시 이런 문제를 계속계속 풀어가야 될것 같은데 typescript의 타입들을 만들거나 풀때 꿀팁 같은게 있을까요? 현재 제가 하는 방식은 type result = Route["search"]; 이런식으로 대충 원하는 모양을 만든다음에 마우스 커서를 올려서 타입을 확인하면서 천천히 푸는 방법인데 혹시 더 좋은 방법이나 꿀팁이 있으시다면 알려주시면 감사합니다!
2024-01-25T10:59:48.008Z
Lượt thích
1
Số bình luận
2
Lượt xem
310
Hỏi & Đáp
자체 해결 했는데, 크롬에서 설정 탭 간 다음에 인프런 사이트 쿠키, 캐시 삭제 하고 다시 로그인 하니까 잘나옵니다
2023-12-13T13:51:29.096Z
Lượt thích
0
Số bình luận
2
Lượt xem
628
Hỏi & Đáp
헉 정답과 똑같군요!
2023-12-08T02:57:55.089Z
Lượt thích
0
Số bình luận
1
Lượt xem
238
Hỏi & Đáp
Set 자료형은 중복을 제거 하기 때문에 중복 문자열 길이가 같으면 그것도 중복 제거 해버립니다. console.log(sol('KKHTTSSSSSEE')); 결과 : K2HTS5E K2가 T2가 나와야 하는데 2가 중복 되어 사라지는걸 알 수 있습니다.
2023-12-03T13:43:47.273Z
Lượt thích
0
Số bình luận
2
Lượt xem
343
Hỏi & Đáp
필요한 분들을 위해 예제 코드를 올려 두겠습니다. import React, { Component } from "react"; class WordRelay extends Component { state = { word: "제로초", value: "", result: "", }; onSubmitForm = (e: React.FormEvent) => { e.preventDefault(); const input = this.input; if (this.state.word[this.state.word.length - 1] === this.state.value[0]) { this.setState({ result: "딩동댕", word: this.state.value, value: "", }); if (input) { input.focus(); } } else { this.setState({ result: "땡", value: "", }); if (input) { input.focus(); } } }; onChangeInput = (e: React.ChangeEvent ) => { this.setState({ value: e.currentTarget.value }); }; input: HTMLInputElement | null = null; // this.input을 생성 onRefInput = (c: HTMLInputElement) => { this.input = c; }; render() { return ( {this.state.word} 클릭!!! {this.state.result} ); } } export default WordRelay;
2023-11-25T11:47:45.875Z
Lượt thích
1
Số bình luận
1
Lượt xem
298
Hỏi & Đáp
와 진짜 잘하시네요. 이렇게 풀 수 도 있네요
2023-11-10T03:26:36.306Z
Lượt thích
0
Số bình luận
3
Lượt xem
443
Hỏi & Đáp
저보다 대각선 구하는 코드가 깔끔하시네요. 한수 배우고 갑니다
2023-11-10T03:25:51.990Z
Lượt thích
0
Số bình luận
2
Lượt xem
316
Hỏi & Đáp
제가 대신 답변 드리자면, 문제 설명에 출력 설명 부분을 보시면, 입력된 순서대로 등수를 출력한다. 라고 되어 있어서 해당 코드는 안될것 같습니다!
2023-11-09T03:45:13.950Z
Lượt thích
0
Số bình luận
1
Lượt xem
315
Hỏi & Đáp
저게 싫다면 npm axios 공식 문서에 나와 있듯이 esModuleInterop : true 해당 옵션을 true로 바꿔주면 된다. 근데 해당 옵션으로 바꾸어 주었을때 주의 사항이 있는데 /* Modules */ "module": "commonjs" /* Specify what module code is generated. */, module옵션을 commonjs로 바꿔 줘야한다.
2023-11-08T00:32:25.756Z
Lượt thích
0
Số bình luận
1
Lượt xem
889
Hỏi & Đáp
첫번째 숫자는 무조건 출력이니까 function solution(num, array) { return array.filter((v, index) => index === 0 ? v : array[index] > array[index - 1] ); } console.log(solution(6, [7, 3, 9, 5, 6, 12])); 코드를 이렇게 수정 해야 될것 같습니다.
2023-11-07T12:04:48.758Z
Lượt thích
0
Số bình luận
1
Lượt xem
433