Devalore Interview Question

edit the defined code to get a specific result