I am using charCodeAt to convert 3 characters to hex.

var chop= str.slice(2,5);
var hex = '';
for(var i=0;i<chop.length;i++) {
hex +=...