I’m sure you have had that moment where you are at a complete loss as to why something isn’t working (not to mention the annoyance that you know that the answer is going to be stupidly simple). You have tried absolutely everything and ran through the process step by step but still, it’s not working.
Well, I had this particular moment when trying to write some JavaScript for the backend of a plugin we were building. No matter what I did it would respond. No console.logs, no alerts, nada!!
Turns out that enqueuing for the backend has a subtle difference to enqueuing for the front end.

Enqueuing On the Front End

function custom_script(){
wp_enqueue_script('My Custom Script', plugins_url( 'js/custom.js', __FILE__ ), array());}
add_action('wp_enqueue_scripts', 'custom_scripts');

Enqueing On The Back End

function custom_script(){
wp_enqueue_script('My Custom Script', plugins_url( 'js/custom.js', __FILE__ ), array());}
add_action('admin_enqueue_scripts', 'custom_scripts');

The only difference is in the last line. Use admin_enqueue_scirpts instead of wp_enqueue_scripts.
Happy coding folks!!