JSFiddle - React, Tailwind, and code Playground

JavaScript

var s = 'hey, have fun here.'
var result = [];
result.push(s.charAt(2));
result.push(s.charAt('2'));
result.push(s.charAt('a'));
document.write(result);