A quick question coming from someone learning JavaScript. So far I am aware that primitive types hold only their value, so why is it I can store a number (a primitive type) and then call the toString method on it as if it were an object? e.g.
let num = 4;
let strNum = num.toString(); /* how is this possible? isn't num just a single piece of data in memory, how can it access this toString method? */