hyTags
HomeHome DocumentationDocumentation

array-remove-duplicates

Creates a new array with duplicate elements removed, keeping only first occurrence of each.
Parameter
Type
Description
self
[T]
Array to remove duplicates from
return
[T]
New array with duplicates removed
Test Case:Remove duplicates
    <div></div>
    
    <array-new type="string">
    <array-append value="a">
    <array-append value="b">
    <array-append value="a">
    <array-append value="c">
    <array-remove-duplicates>
    <array-join separator=",">
    <assert-equal value="a,b,c" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed