A client-side javascript runs on the user’s computer. The source code is visible to the user. It is used for validations and functionality for user calls. Its functionality depends on the browser and version.
A server-side javascript runs on the webserver. The source code is not visible to the user because the output of the server-side program is an HTML page. It is used for business logic and data accessing from the database. The pages are created dynamically. It does not depend on the client.
Want to be a web developer? Check out the full stack developer course from Intellipaat.