The codePointAt() of a String returns a non-negative integer that is the Unicode code point value of the character starting at the given index. Note that the index is still based on UTF-16 code units, not Unicode code points.

    
    const text = "Hello World";

    const textCodePointZero = text.codePointAt(0);

    console.log(textCodePointZero)
    // 72


    // another example
    const icons = '☃★♲';

    console.log(icons.codePointAt(1));
    // "9733"