alphabetを列挙
する
/icons/javascript.icon
code:script.js
export function range(from, to) {
const first = from.charCodeAt(0);
const last = to.charCodeAt(0);
const result = [];
for (let i = first; i <= last; i++) {
result.push(String.fromCodePoint(i));
}
return result;
}
code:js
(async () => {
const {range} = await import('/api/code/programming-notes/alphabetを列挙/script.js');
console.log(range('a', 'z'));
})();
JavaScript.icon