JSFiddle - React, Tailwind, and code Playground

JavaScript

alert($('<div />').html("line1\nline2").text().charCodeAt(5) === $('<div />').html(" line1\nline2").text().charCodeAt(6));