I am wondering whether is it possible to pass any variable to external java-script file
For example
I have this
Now in gallery.js, the value of the PHP variable $x can be accessed using the JavaScript variable x. Make sure to generate syntactically correct JavaScript.
gallery.js
$x
x