With the use of document.querySelector() and functions I created this simple app which upon providing initial price, quantity and current price will calculate what is the profit or loss and percentage of the same, and will use .innerHTML to diplay the same.