Plotting Logarithmic Functions Explained Javascript Interview