UNPKG

hd-utils

Version:

A handy utils for modern JS developers

9 lines (8 loc) 305 B
/** * @description It takes a string and returns the ASCII code for the first character in the string * @param {string} char - The character to get the ASCII code for. * @returns The ASCII code for the character. */ export default function getAsciiCodeForChar(char) { return char.charCodeAt(0); }