Experian interview question

How to resolve javascript and Java functions