Write a function `formatCurrency` that takes a number and a currency code (like 'USD', 'EUR', 'JPY') and returns the currency formatted string using international formatting rules.
Input: formatCurrency(1234.56, 'USD')
Output: "$1,234.56"
Explanation: Formatted using USD standards.
Input: formatCurrency(1234.56, 'EUR')
Output: "€1,234.56"
Explanation: Formatted using EUR standards.