Hello,
In this case you need to create child theme and add the code in your child theme functions.php file:
add_action( 'wp_enqueue_scripts', 'etheme' );
function etheme() {
wp_enqueue_script( 'etheme', get_stylesheet_directory_uri() . '/js/etheme.js' );
}
Create “js” folder in child theme and copy etheme.js file with needed changes in the child theme “js” directory so you won’t lose modifications after theme update.
Best regards,
Jack Richardson.