Write a function that checks if a key is repeated in the string by creating an Object for the given string. If a key is repeated the function will return true. If no key is repeated it will return false
function checkRepetition(str){
// write your code here
}
console.log(checkRepetition("hello"));// true
console.log(checkRepetition("zebra"));// false