String interpolation: Difference between revisions

Content deleted Content added
Java: Java 21 now has string templates
Tags: nowiki added Visual edit
SidShakal (talk | contribs)
Java: Added missing header for JavaScript section
Tags: Mobile edit Mobile web edit
Line 150:
STR."Installing \{deploy.image()} on Stage \{deploy.stage()} ..."
 
</syntaxhighlight>https://openjdk.org/jeps/430<nowiki/>{{Main article|JavaScript}}
 
=== JavaScript ===
{{Main article|JavaScript}}
[[JavaScript]], as of the [[ECMAScript]] 2015 (ES6) standard, supports string interpolation using backticks <code>``</code>. This feature is called ''template literals''.<ref>{{Cite web|url=https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals|title = Template literals (Template strings) - JavaScript &#124; MDN}}</ref> Here is an example:
<syntaxhighlight lang="javascript">