A pot
AppleGalaMust696
A pot
CornPioneer3751
A pot
ChristmasRose
A pot
Primrose
A pot
TomatoRomaVF1
A pot
Rosemary
A pot
WheatNorin10
1234567
let garden = [
	"Apple 'Gala Must 696'", 
	"Corn 'Pioneer 3751'", 
	"Christmas Rose", "Primrose", 
	"Tomato 'Roma VF1'", "Rosemary", 
	"Wheat 'Norin 10'"
];
123456
for  (const plant of garden) {
if (plant.match(//i) {
water(plant);
}
}
Lesson 10 / 42

Lesson task •

Water all the plants that has digits in their names

Any single digit character

\d

Matches any single digit character
1234567891011
console.log(!!"foo42".match(/\d/)) // true 
console.log(!!"foo".match(/\d/)) // false 
console.log(!!"foo42".match(/foo\d/)) // true 
console.log(!!"foo$".match(/foo\d/)) // false 
console.log(!!"foo42".match(/\d$/)) // true 
console.log(!!"foo$".match(/\d$/)) // false 
console.log(!!"foo".match(/\d$/)) // false 
console.log(!!"foo42".match(/\w\d/)) // true 
console.log(!!"foo$".match(/\w\d/)) // false 
console.log(!!"foo 42".match(/^\w\w\w\s\d\d$/)) // true 
console.log(!!"bar 42".match(/^\w\w\w\s\d\d$/)) // true