---
type: bookmarks
tags: ['javascript']
status: release
ctime: 2022-04-09
mtime: 2024-03-22
---

- [Rethinking the JavaScript ternary operator](https://jrsinclair.com/articles/2021/rethinking-the-javascript-ternary-operator/)[^1-1]
- [Break a forEach Loop with JavaScript](https://davidwalsh.name/javascript-array-tricks-3)[^1-2]
- [You Can Label a JavaScript `if` Statement | CSS-Tricks](https://css-tricks.com/you-can-label-a-javascript-if-statement/)[^1-3]
- [Refactoring optional chaining into a large codebase: lessons learned – Lea Verou](https://lea.verou.me/2020/06/refactoring-optional-chaining-into-a-large-codebase-lessons-learned/)[^1-4]
- [[HTML5] 꼼꼼히 살펴보는 SCRIPT 엘리먼트 - 코드쓰는사람](https://taegon.kim/archives/6804)[^1-6]
- [Single Page Applications using Rust](https://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/)[^1-5]
- [Fast and maintainable patterns for fetching from a database – Sophie Alpert](https://sophiebits.com/2020/01/01/fast-maintainable-db-patterns.html)[^1-7]
- [Deep-copying in JavaScript using structuredClone](https://web.dev/structured-clone/)[^1-8]
- [Holistic Review of TC39 "Dataflow" Proposals — Tab Completion](https://www.xanthir.com/b5Gd0)[^1-9]

---

[^1-1]: __삼항연산자__(ternary)의 어두운면과 우려를 나타내는 글
[^1-2]: `forEach` 루프 `break`하는 트릭. 참조하는 배열의 length값을 0으로.
[^1-3]: 조건문에서 [`label`](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/label)을 지정해서 해당 블록으로 `break`가 가능하다는걸 보여주는 내용. 실제 적용할만한 사례는 거의 없고 글쓴이는 while+switch문에서 break를 좀 더 효율적으로 사용한 예를 보여주고 있다.
[^1-4]: [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) 문법으로 리팩토링 하면서...변경 가능한 부분(삼항연산자, 배열, 기능탐지)과 주의사항(값 할당, 잘못된 위치에 표기), 조심할 부분(null/undefined, 연산 순서와 순위, return 항상 호출됨)으로 구분해서 정리한 글. 커밋을 보면 실제로 어떻게 작업했는지 확인도 가능하다.
[^1-5]: rust로 작성하고 wasm으로 컴파일해서 클라이언트 프로그램을 작성하는 방법을 자세하게 설명하고 있다. rust에 관심이 있거나 하다면 볼만한 글.
[^1-6]: `<script />` 태그와 속성값에 대한 정리
[^1-7]: 종속성 구조를 파악해서 최적의 병렬화로 빠르게 데이터 가져오기
[^1-8]: `structuredClone()`
[^1-9]: pipe, flow 제안(초안)사항을 검토하는 관점에서 보는 시각