Home »
MCQs »
Lodash MCQs
Which of the following method Gets rid of all false values in an array?
2. Which of the following method Gets rid of all false values in an array?
- _.del(array):
- _.remove(array):
- _.false(array):
- _.compact(array)
Answer: D) _.compact(array)
Explanation:
_.compact(array) method Gets rid of all false values in an array.