Let's start with the following code snippet:
let vAny: any = 10
let s1: string = vAny;
console.log(typeof s1)
In this scenario, I have explicitly defined that s1
should be a string. However, when inspecting the type of s1
, it shows up as a number instead. How can this discrepancy be explained?