+ 1

Trying out the ZipCode validator... It brongs out errors, wonder where could the problem be

let zipCode = prompt() let test = /[\D ]/g.test(zipCode); if(zipCode.length=5 && test= false){ console.log('valid') } elsd{ console.log('invalid') }

10th Feb 2023, 5:26 PM
Kizito David
Kizito David - avatar
3 ответов
+ 4
This example shows a way how it can be done. In add you can check here the eegular expession: https://code.sololearn.com/WHl9x8w4dldn/?ref=app
10th Feb 2023, 6:41 PM
JaScript
JaScript - avatar
+ 2
As headmaster of the post office, sometimes people write zip codes that don't exist or zip codes that are not valid. You are tasked with making a system to check if the inputted zip code is a valid zip code.
10th Feb 2023, 5:28 PM
Kizito David
Kizito David - avatar
+ 2
Welldone brother JaScript
12th Feb 2023, 8:12 PM
Kizito David
Kizito David - avatar