generate functionWed, 30 Nov 2022

find if the given string has the letter "e" in it, and output an alert if so

hasE_in <- function(str) { if (str %in% strsplit(str, "")[[1]]) { cat("\a") } } hasE_in("Hello")

Want to kickstart your project?Use the new AI Studio to create your code