DEV Community

loading...

Discussion on: Code Snippet Series: Remove Junk from Array

Collapse
hokanginfo profile image
HoKangInfo

I guess,

  1. v == null
  2. v is Array
  3. v is String but test v.length === 0 , then trim
  4. v is Object
Forem Open with the Forem app