Enforced immutability: Difference between revisions

jq
(→‎{{header|Ruby}}: Added comment about freezing strings in Ruby > 2.0)
(jq)
Line 403:
<lang javascript>const pi = 3.1415;
const msg = "Hello World";</lang>
 
=={{header|jq}}==
All values in jq are immutable. Sometimes the syntax may make it appear as though a value is being altered, but that is never the case. For example, consider the following pipeline:<lang jq>
["a", "b"] as $a | $a[0] = 1 as $b | $a</lang>
 
Here, the result is ["a", "b"].
 
=={{header|Logtalk}}==
2,501

edits