Im new to wordpress and im trying to load javascript to it.
This is my functions.php
add_action('wp_enque_scripts',function(){
wp_enqueue_script('$javascript', get_stylesheet_directory_uri().
'javascript/javascript.js', [], false, true);
});
and this is my javascript.js
console.log("hi");
When i open my browser's console i cant see the printed message. Plus my script file link isnt loaded in the HTML. What might be wrong? Is it that i didnt specified the javascript version?