1) value types are always copied
Sort of. Most value types still look like JavaScript objects which are passed by reference. Internally, the reference nature is simulated by copying the data into a local and two-way-synchronizing with the original. This becomes expensive if either side changes often and/or the type has a lot of data.
3) types like int are not value types so they have to be treated differently in your case. However, Number.isInteger(n) may get you close.
Numbers are still value types. What makes them special is that they are not objects in JavaScript and therefore not passed as reference. And you can also not use instanceOf on non-objects.
best regards, Ulf _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest