All Tracks/lab falsy remover/
Đang tải...
Hướng dẫn thử thách
1 / 1

Implement a Falsy Remover

In this lab you will create a function that removes all falsy values from an array. Falsy values in JavaScript are `false`, `null`, `0`, `""`, `undefined`, and `NaN`. **Objective**: Fulfill the user stories below and get all the tests to pass to complete the lab. **User Stories:** 1. You should have a `bouncer` function that takes an array as argument. 1. The `bouncer` function should return a new array that contains the same elements as the array passed in as argument with the falsy elements removed. 1. The `bouncer` function should not change the array passed in as an argument. Hint: Try converting each value to a Boolean.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.js
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.