Context is needed... at least some explanation or bridge examples, like... why and what do I need to navigate this particular web landing page.
Website feels like an author exercise in ocaml for js web plugin.
a, b variables are just used for computing x_power_8, you don't need them outside of this scope. I think the point of the exercise is to use variable binding, though I agree the website doesn't explain much
If that bothers you, you shouldn't be learning ocaml. Look at the latest stack overflow developer surveys. A vast majority of developers and real applications never touch ocaml.
That's not what OCaml is like, at all. You clearly hate it, for whatever reason. Fine, have it your way. But popularity contests on SO are not an argument and they explain nothing.
This is a much better starting point: https://ocaml.org/docs
Using the search engine of your choice, you can find many more sources just looking for "learn ocaml".
Indeed the link is a not an introduction to OCaml but a demo instance of Learn-ocaml which is framework for building online exercise websites to complement (online or physical) lectures. This is why the instance is hosted on the OCaml Software Foundation website rather than ocaml.org: the demo is not targeted to learners but to teachers.
Having seen "A tour of Elm,"[0] I really prefer that style. The left-hand side (what English readers read first) is an explanation of the concept, then the right side is the code, and the explanation gives you enough details to complete the code.
This introduction doesn't really explain anything, as I guess it assumes you've learned OCaml elsewhere and are just here to practice.
I tried the first exercise, and it felt more like a math problem than an exercise to teach a programming concept:
>Suppose that a variable x exists and is an integer.
>Define a variable x_power_8 that uses three multiplications to calculate x to the power of 8. The only function you are allowed to call is the (*) operator.
>Hint: use auxiliary variables.
So, at first I thought I was supposed to just call multiply eight times, and then I realized that they said you can only call multiply three times. So, you're supposed to do let a = x * x; let b = a * a; let x_power_8 = b * b. But that feels really contrived to me and not like anything I'd write in a real application, even a toy one. If the idea is teaching variables, why not just ask me to declare a variable that represents x plus 1?
[0] https://a-tour-of-elm.axelerator.de/#JSFunctions