Find the Amount of Potatoes

Published by Nomore in

Create a function to return the amount of potatoes there are in a string.

Examples

Potatoes("potato") ➞ 1

Potatoes("potatopotato") ➞ 2

Potatoes("potatoapple") ➞ 1

Notes

N/A

Watch a quick demo on how Edabit works.