I've been trying to pass a php variable's value to JavaScript. I can do it when the js code put in the same php view file. but I'dont want to put js code inside the php because its become very tedious to debug or further development.
$this->registerJsFile('/js/myJs.js', [JqueryAsset::className()]);
please help.