hyTags
HomeHome DocumentationDocumentation

array-contains

Checks if array contains the given value.
Parameter
Type
Description
self
[T]
Array to search
value
T
Value to search for
return
bool
True if array contains value, false otherwise
Test Case:Contains existing value
    <div></div>
    
    <array-new type="string">
    <array-append value="a">
    <array-append value="b">
    <array-contains value="b">
    <assert-true>
    
    👆 Try to change something!
  • Test Case:Does not contain missing value
      <div></div>
      
      <array-new type="string">
      <array-append value="a">
      <array-contains value="z">
      <assert-false>
      
      👆 Try to change something!
    • Test succeeded Test failed