I kind of hate PEMDAS because multiplication and division are the same thing (division is multiplication by the reciprocal) and addition and subtraction are the same thing (subtraction is addition of the negation). moreover, multiplication and addition are commutative with themselves. so it should really be PEMA. lastly, if it's fucking ambiguous in any way, don't write it that way. just use parentheses. the notation that puts divisors in the denominator completely disambiguates everything.
just learn what associativity, commutativity, and the distribution law are in the first place and you'll understand why something like PEMDAS exists. it's a notational trick to make it clear where those laws can be applied. when you leave the realm of numbers, some or all of these laws will stop applying and you need to still learn how to calculate the answer. matrices don't have commutative multiplication and if it won't associate, stop and find a different way to solve a different way to solve your problem because nope nope nope nope (fucking programmers breaking associativity in binary operations because "math is hard" - no bitch, what's hard is trying to work out what the hell your operation does).
in summary, PEMDAS is liberalism and fuck javascript.