Dynamics 365 Web API can be called and accessed using JavaScript. You can use Web API with HTML web resources, form scripts, and ribbon commands to perform various operations on data.
Web API is very convenient to use with JavaScript as it returns results in the form of JSON objects that can be easily converted to JavaScript objects.
In Dynamics 365, Web API is used mainly with HTML web resources and in Single Page Applications.