The "inversion of control" is a prime distinction between a JavaScript framework and a library. A framework demonstrates when the developer's code should be employed and how the web application should perform, whereas a library is used at the discretion of the designer.