How can I use client side (browser) javascript to call elasticsearch?

Hello
I am new to programming and ES.
I want to learn by building something -that looks- like Google search page.

A simple search page using only the browser JavaScript.
I want to use HTTP API calls to ES to return documents containing the search term in any field.
Can someone help me with this?

Thanks,

You can leverage the JS client for this - https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html

thank you very much Mark.