There is a function is Used to add files in WordPress.
wp_register_script( $handle, $src, $deps, $ver, $in_footer );
This is an example of code which are used to add Custom files in WordPress themes,
Just copy this code on your theme and plugin main file like function file.
// Register the script like this for a plugin:
wp_register_script( 'custom-script', plugins_url( '/js/custom-script.js', __FILE__ ) );
// Register the script like this for a theme:
wp_register_script( 'custom-script', get_template_directory_uri() . '/js/custom-script.js' );
// For either a plugin or a theme, you can then enqueue the script:
wp_enqueue_script( 'custom-script' );
add_action( 'wp_enqueue_scripts', 'wptutspoint_scripts_basic' );