In JavaScript, Java, C#, Dart, Python, etc. it will print 3 because a and b are references to values.
In C++, Rust and TCL, (and maybe Go? I don't remember) it will print 1 because a and b are values.
In value based languages you need explicit syntax to make references and dereference.
In reference-based languages you need explicit syntax to copy values. Often this is omitted entirely which is quite annoying. Until very recently the standard solution to copy a variable was to serialise it to JSON and back again!!
Also worth noting that for immutable values (i.e. all values in Haskell, strings in JavaScript, etc.) there's no observable difference between the two.