Dell Technologies interview question

JavaScript code for lang. conversion?