All questions

Intermediate · JavaScript · Regex

Mask emails and card numbers in logs

Commonly asked: Asked in fintech QA rounds · ~12 min

Write mask(line) that replaces every email's user part with *** (keep the domain) and every 16-digit card number with **** **** **** plus its last 4 digits.

Checking your membership…