A pot
Rose
A pot
Rue
A pot
Rice
A pot
Rye
1
let garden = ["Rose", "Rue", "Rice", "Rye"];
123456
for  (const plant of garden) {
if (plant.match(//i) {
fertilize(plant);
}
}
Lesson 3 / 42

Lesson task •

Fertilize "Rye" and "Rue" but not the other plants

Any single single character

.

Matches any single symbol

To write a pattern with a "gutshot" where can stand any symbol use . token:

123
console.log(!!"bar".match(/ba./)) // true 
console.log(!!"baz".match(/ba./)) // true 
console.log(!!"foo".match(/ba./)) // false