Write a function that creates an Object from the given string with the characters as keys and the values as 'true' for the given key. The function should return the consturcted Object.
function createObject(str){
// write your code here
}
console.log(createObject("hello")); // {'h' :true, 'e' :true, 'l' :true, 'o' :true}
console.log(createObject("aeroplane"));//{'a': true, 'e' :true,'r' :true, 'o' :true, 'p' :true, 'l' :true,'n' :true}