✘✘✘ Javascript/Typescript
Non-Null assertion:: exclamation mark (!) after variable. 변수 뒤 ! 느낌표
PrettyLog
2023. 4. 8. 15:59
The exclamation mark (!) is the non-null assertion operator in TypeScript. It tells the compiler that we are sure that the value returned by document.getElementById('root') is not null or undefined.
const dom = document.getElementById('root')! // dom is not null