• End Zeros

Question related to mission End Zeros

 

I can't understand why I get the error:

evalmachine.<anonymous>:9 value = String(value).match(/0/g).length; ^

TypeError: Cannot read property 'length' of null at endZeros (/opt/project/test.ts:5:39) at /opt/project/test.ts:15:14

I checked my code in vs code and it worked there