How to convert each character in the string to an array using the Object.assign() method in JavaScript?