Array.fromintermediateArray.from('hello')
// β ['h', 'e', 'l', 'l', 'o']Use Array.from() on a string to split it into an array of individual characters.
str.split('') splits a string by UTF-16 code units, which breaks emoji and other characters outside the Basic Multilingual Plane into two surrogates. Array.from(str) iterates by code point, keeping emoji intact.
Challenge: Implement countCodePoints that returns the number of Unicode code points in a string using Array.from(str).length.
countCodePoints('hello') // β 5
countCodePoints('hi π') // β 4 (not 5 β emoji is one code point)