.contains(val)
Description
Contains returns a boolean for if a value is "contained" in another value
Parameters
Contains takes only one parameter, and will treat multiple parameters as one parameter
Usage On Arrays
log [1,2,3,4,5,6].contains(1)
// true
log [1,2,3,4,5,6].contains(7)
// false
Usage On Strings
log "hello world".contains("hello")
// true
log "hello world".contains("1234")
// false
Last updated
Was this helpful?