Question 1 Let's create a function to enter a name. If there is a period (.) Or a space other than the name, an error will be displayed.
Tips Use the include? method.
include? The include? method is a method that determines whether the specified element is included in an array or character string. Screenshot 2020-08-14 16.50.22.png
If there is (.) Or () in str, it is OK if you make a conditional branch with include? So that you can not register.
Recommended Posts