I have a function in JavaScript which returns square of the given number. To get output I take input from user in a form field and on clicking a button trigger that function.
I want to remove that typing parameter and button clicking thing. Is there a way I can have a link which on clicked will give me square of say 100. I want to have that link dynamic. Example, square.com/100 should give me square of 100. Square.com/2 should give square of 2. But this is to be done on dynamic hosting like GitHub pages.
frameworks: I am not using any framework but I will host it on github pages so any framework that will work with github pages that is static hosting is also good
As we are not using any backend processing I think this can be done. But not sure how