String.fromCharCodes()
🔰 JS ⟩ Types ⟩ String ⟩ methods
// ⭐️ String.fromCharCodes(65, 70) -> 'ABCDEF'
String.fromCharCodes = function(from, to){
let array = [];
for(let i = from; i <= to; i++) array.push(i);
return array
.map(code => String.fromCharCode(code))
.join('');
};
// ⭐️ StringfromCharCodes(65, 70) -> 'ABCDEF'
export function StringfromCharCodes(from, to){
let array = [];
for(let i = from; i <= to; i++) array.push(i);
return array
.map(code => String.fromCharCode(code))
.join('');
};
Last updated
Was this helpful?