Hey I am trying to understand data location more it is stated in the docs that "Assignments from memory to memory only create references. This means that changes to one memory variable are also visible in all other memory variables that refer to the same data."
The problem is I tried testing it out with strings in code below it still returns the original value even after changing it later on. If I'm not wrong testing and newTesting should point to the same reference right? Since its memory to memory assignment.
function checkMax(string calldata _test) public view returns (string memory) {
string memory testing = _test;
string memory newTesting = testing;
newTesting = "changed bro!";
assert(maxAmount == 100);
return testing; // still returns the original _test parameter instead of "changed bro!"
}