Loading scripts and stylesheets together failure


I’m trying to load scripts and stylesheets together at same function. At first I loaded stylesheet by itself and it worked after I added admin_enqueue_scripts function in additional to wp_enqueue_scripts.

Now I’m trying to load stylesheets and scripts in the same function, unfortunately that fails to exist, and also prevent CSS to load.

I can’t find any typo’s or something online that related to my issue.

  function loadAssets(){       wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css');       wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.js');       wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js');   }    //Applying those loading references   add_action('wp_enqueue_scripts', 'loadAssets');   add_action('admin_enqueue_scripts', 'loadAssets'); 

How can I load both JavaScript files and CSS files on the same function?