Template Literals
What is the output of `${null}${undefined}` in JavaScript?
The output of `${null}${undefined}` is "nullundefined". When null and undefined are used in template interpolation, they are converted to the strings "null" and "undefined" respectively. This follows JavaScript's general string conversion rules, where null becomes "null" and undefined becomes "undefined" when converted to strings. The template literal evaluates each interpolation separately and concatenates the results. Since there's no space or other characters between the two interpolations in this example, the strings are joined directly. This behavior is consistent with how these values are converted to strings in other contexts, such as with the String() function or when using the + operator with strings.