Does the current path of JS need to be added. /?

what"s the difference between adding . / to the current path in JS?

the following are all the same effects:

<img src="1.png" alt="">
<img src="./1.png" alt="">

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

Mar.16,2021

it doesn't make much difference

No. / find the corresponding file under the current folder by default

added. / is to specify to find the corresponding files under the current folder

Menu