Pretty confident now with what i have learnt but not sure about the typeof operator. I understand how it works etc but if declare a new variable which adds two variables of differing types will it default to one or the other? Or is there some other magic going on?
Below i’ve added a number and text type under a new variable. Then when calling the typeof it says string.
Hope that makes sense and i’ve added the code as a codebyte? is that right?
Sure i’ll be on alot so looking forward to talking to some of you soon!
let text = "hello"; let number = "1" let test = number+text; console.log(test); //output: 1hello console.log(typeof test); //output: string