Skip to content

Tag: arrays

Concatinate different type arrays

suppose, array1 = [‘B’, ‘G’, ‘R’, ‘A’], array2 is Uint8Array, how to concatinate these two arrays ? I used var array3 = array1.concat(array2), but the result seems wrong , and array3.length is alwalys 5, regardless of content of array2. Answer You can do:

Using maps over template literals

so I need to print a boolean value if the given string contains [[placeholder:var3]] but the var3 will be dynamically fed from an array as belwo: I tried using map around the template literals but it is throwing me an error also tried like above eg but it checks only first value of the array, so can someone p…