Javascript – How can i add a negative number to the displayArray?
I am trying to create a calculator and unable to calculate negative numbers because my current logic splits displayValue which is a string using regular expressions(Regex) to separate numbers and operators into an array displayArray. so, when i try to…