M
M B HONG 20
Hi all -
I was wondering if Javascript has a way to easily remove duplicates
from a string. For example, if I had a string:
"car truck car truck truck tree post post tree"
it should turn into:
"car truck tree post"
or something to that effect. The order of words does not matter for
me, so it does not have to be sorted in any particular way. If anyone
can shed some light on this I would greatly appreciate it. Thanks in
advance.
I was wondering if Javascript has a way to easily remove duplicates
from a string. For example, if I had a string:
"car truck car truck truck tree post post tree"
it should turn into:
"car truck tree post"
or something to that effect. The order of words does not matter for
me, so it does not have to be sorted in any particular way. If anyone
can shed some light on this I would greatly appreciate it. Thanks in
advance.