Javascript is not getting registered

Hello Experts,

I am using Yii2 Version 2.0.9 on Windows7 XAMPP. I am trying to register my javascript but it is not getting some strange issue.

I have included the "myFunction.js" inside web/js folder. Then I have included in the AppAsset.php as below:

public $js = [




Now the issue is when I trying to use this "myFunction.js" from my view file it is not functioning. But when I trying to find through "Inspect Element" I can see the

<script src="/js/timer.js"></script>

<script src="/js/myFunction.js"></script>


But when I am trying to access it through localhost/js, I can only able to see



I am able to use timer.js but myFunction.js is not working in view page.

Any idea for this issue??

Thanks in advance.



hard to point to what is wrong, but you could double check your file names make sure they match as you typed in AppAsset.php

Thanks Alrazi. From your guidance, I understood that, this is not something regular/syntax problem. So I checked all the settings and folder locations.

I found the issue and after required modification its working.