Get values

Report a typo

An object called newMap is already created. It has numbers as keys and there are corresponding values associated with the keys. Your task is to iterate over the map and identify the keys that are divisible by 2. Once identified, log both the key and its corresponding value to the console.

Sample Input 1:

Sample Output 1:

2 = Value-2
4 = Value-4
Write a program in JavaScript





___

Create a free account to access the full topic