How was tender coconut jelly formed

As you all know that tender coconuts has juice and a weird but tasty jelly inside
But does anyone know how was the formed,??
Well this is very interesting
As you all know that when water is in a place or anywhere after some days
There will be something slippery, greeny, yucky thing formed
Because the water was in that place for a long time
Like that when the coconut water is formed inside, that jelly substance also forms because of the
Water
And that is what we eat