JSFiddle - React, Tailwind, and code Playground

HTML

<div id='whitespace'>Test &nbsp; This</div>

JavaScript

$( function() {
    var $whitespace = $('#whitespace');
    var result = '<p>' + jQuery.text($whitespace).charCodeAt(5) + '</p>';
    $( result ).insertAfter( '#whitespace' );
});