I'm trying to convert numbers into letters. I'm making an array of divs that either need a number or a number and letter. so 1-3 are just 1-3. but 4-13 need to be a/4, b/5, c6 and so on. is there a way I can converts these numbers into letter easily. maybe changing the ascii values by a set amount?
for(var i = 1; i < 33; i++){
if( i < 4 || (i > 13 && i < 20) || i > 29){
$('#teeth-diagram').append("<div class='tooth' id='" + i + "'> </div>");
}else{
$('#teeth-diagram').append("<div class='tooth' id='" + Letter goes here + "/" + i + "'> </div>");
}
}
ord
andchr
in javascript? – Sobriety