16進数を2進数へ変換

by s_hiroshi

TypeScript

const element = '00';
const hex = parseInt(element, 16);
console.log(('0000' + hex.toString(2)).slice(-8).split(''));
      //return ('0000' + hex.toString(2)).slice(-8).split('').reverse().map((element:string) => {
        //return parseInt(element);