Given a string, return an Object whose keys are the characters and the values are the frequency of each the character present in the string. For eg.
let str = "vivek";
function buildObjectFromString(str){
// write your code here
}
buildObjectFromString(str);
// should return
{
"v" :2,
"i" :1,
"e" :1,
"k" :1
}