본문 바로가기

Javascript19

JavaScript에서 false로 인식되는 값; 거짓같은 값; Falsy https://developer.mozilla.org/ko/docs/Glossary/Falsy 거짓같은 값 - 용어 사전 | MDN 거짓 같은 값(Falsy, falsey로 쓰이기도 함) 값은 불리언 문맥에서 false로 평가되는 값입니다. developer.mozilla.org 나는 Java로 프로그래밍을 시작했는데 보통 if문에서 참/거짓 연산에 대한 비교 연산을 하면 예시는 보통 다음과 같이 작성되어 있었다. boolean flag = true; if (flag == true) { System.out.println("참입니다."); } else { System.out.println("거짓입니다."); } == 연산으로 참, 거짓을 비교하는 것인데, 이 구문은 다음과 같이도 쓸 수 있다. boolea.. 2021. 11. 11.
Array.prototype.sort() https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/sort Array.prototype.sort() - JavaScript | MDN sort() 메서드는 배열의 요소를 적절한 위치에 정렬한 후 그 배열을 반환합니다. 정렬은 stable sort가 아닐 수 있습니다. 기본 정렬 순서는 문자열의 유니코드 코드 포인트를 따릅니다. developer.mozilla.org https://www.w3schools.com/jsref/jsref_sort.asp JavaScript Array sort() Method W3Schools offers free online tutorials, references and exe.. 2021. 11. 10.
Array.prototype.filter() https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/filter Array.prototype.filter() - JavaScript | MDN filter() 메서드는 주어진 함수의 테스트를 통과하는 모든 요소를 모아 새로운 배열로 반환합니다. developer.mozilla.org https://www.w3schools.com/jsref/jsref_filter.asp JavaScript Array filter() Method W3Schools offers free online tutorials, references and exercises in all the major languages of the web.. 2021. 11. 9.
Array.prototype.map() https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/map Array.prototype.map() - JavaScript | MDN map() 메서드는 배열 내의 모든 요소 각각에 대하여 주어진 함수를 호출한 결과를 모아 새로운 배열을 반환합니다. developer.mozilla.org https://www.w3schools.com/jsref/jsref_map.asp JavaScript Array map() Method W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Co.. 2021. 11. 3.