<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort_js_files(js_files):
 """Sorts JavaScript files in `js_files`. It sorts JavaScript files in a given `js_files` into source files, mock files and spec files based on file extension. Output: * sources: source files for production. The order of source files is significant and should be listed in the below order: - First, all the that defines the other application's angular module. Those files have extension of `.module.js`. The order among them is not significant. - Followed by all other source code files. The order among them is not significant. * mocks: mock files provide mock data/services for tests. They have extension of `.mock.js`. The order among them is not significant. * specs: spec files for testing. They have extension of `.spec.js`. The order among them is not significant. """

    modules = [f for f in js_files if f.endswith(MODULE_EXT)]
    mocks = [f for f in js_files if f.endswith(MOCK_EXT)]
    specs = [f for f in js_files if f.endswith(SPEC_EXT)]

    other_sources = [f for f in js_files
                     if (not f.endswith(MODULE_EXT) and
                         not f.endswith(MOCK_EXT) and
                         not f.endswith(SPEC_EXT))]

    sources = modules + other_sources
    return sources, mocks, specs