Using files from the JS directory in the child theme of WP?

In order to reach out to some file in the directory, in the markup I'm using function like this:
<img src="<?php bloginfo('stylesheet_directory'); ?>/img/companies/new-point.svg">

How do I get the file from a. Js script.? For example, in the context of such a function:
$.get( "ajax/companies/example.html", function( data ) {
 $( ".result" ).html( data );
 alert( "Load was performed." );
 });

The folder 'ajax', aprimer, is at the root of the child theme. The console displays a message that the file was not found
July 12th 19 at 17:16
1 answer
July 12th 19 at 17:18
Solution
When accessed through js to the file, then you need to write either the full path from the site root or relative to the location of the calling script file.

Find more questions by tags JavaScriptWordPress