I wasted 1 hour because a javascript api returns null

Revision en1, by zhanglinjie_, 2022-02-17 19:43:09
'abc'.match(/[a-z]/g)
// this returns a array with three element

'abc'.match(/[1-9]/g)
// this returns null. BUT I EXPECTED A EMPTY ARRAY JUST LIKE OTHER NORMAL LANGUAGE TvT

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zhanglinjie_ 2022-02-17 19:43:09 242 Initial revision (published)