To store mapping of every character from str1 to that of str2 and Initialize all entries of map as - 1.
let map = new Array ( size ) ; map . fill ( 0 ) ; for ( let i = 0 ; i < size ; i ++ ) map [ i ] = - 1 ;