JS File Path: web->js->swap.js
default_head_block.xml
<referenceContainer name="before.body.end">
<block class="Magento\Framework\View\Element\Text" name="swapjs">
<arguments>
<argument name="text" xsi:type="string"><![CDATA[<script type="text/javascript" src="js/swap.js"></script>]]></argument>
</arguments>
</block>
</referenceContainer>
File path not found 404 Error
. Please help me to solve this issue.