Language/JS
[JS] Set, List에 존재하는 값인지 확인하는 로직
PersesTitan(페르)
2023. 1. 27. 14:41
Set
has
set.has(<값>);
set에 값을 포함한다면 true를 반환하고 값이 존재하지 않는다면 false를 반환합니다.

List
includes
list.includes(<값>);
list에 값을 포함한다면 true를 반환하고 값이 존재하지 않는다면 false를 반환합니다.
