When studying JS, I noticed that the JS code is fully accessible in the developer console. All variables and functions can be output and even execute. Hence the following questions:
- Is it possible to somehow hide variables from an extraneous eye in the console?
- Grogging the topic found a completely logical solution: hide all the important logic on the server side. Hence the question: for example, we have a registration form that when you press the button executes the request to the server part, sending the entered data that is already processed on the server. But what prevents the attacker, for example, in the console, perform a manually feature responsible for sending a request, thereby scoring our database with new users? Or do something like this, hurting the project? Is it possible to avoid this?