Where can I find some simple hello world java script examples?

Case 1

  1. click a button
  2. fire up a java script query
  3. the query call a pre build javascript function in the resources.
  4. populate a text field value with hello world

Case 2

  1. click a button
  2. fire up a java script query
  3. the script query populate a text field value with hello world

questions:
Is there a way to see the generated source code?

https://docs.retool.com/docs/scripting-retool

The example in the tutorial seems complicated some how. I am a new retool user. I don't get the flow. I'm have javascript and node.js background. What am i writing in the java-script query? a function, a module?

Welcome to the forum @0x1!

To answer your final question, you just need to throw your js into the query, no functions or anything. Retool wraps your code in a function for you. If you want to see the generated code, the simplest way is to put debugger at the top of your query and open dev tools. Execute the query and voila you see your code and what Retool has done with it.

I would recommend creating some apps from a template (from Apps page: Create New...Create From Template) and picking them apart. Postgres Admin Panel has some js queries to look at.

Then once the general flow of an app is kinda understood, the docs will start to be a lot clearer.