Calculation using wix code

Can i use wix code do the calculation like
If the combination of numbers is AABB e.g.1122 then 104.
If the combination of numbers is ABCD e.g.1234 then 10
8.

And can i run different fomula depend on the dropdown menu?
Like if select dropdown 1 then run A+B.
If select dropdown 2 then run A*B.

I am very grateful for your help.

anyone help?

This isn’t really a Corvid-specific question, just a generic Javascript question. You’ll find thousands of helpful answers related to this on StackOverflow.