Determine the number of key-value pair
Given an object, return the number of key-value pair.
Sample Code:
function countProp(obj) {
// Enter your logic here...
}
Examples:
Input: {key1:'value',key2:'value'}
Output: 2
Explanation: The object has two key-value pair.
Input: {}
Output: 0
Explanation: There are no key-value pairs in Object.