<h1>
    The wijmo.format Method
</h1>
<p>
    Creating strings based on formatted data can be challenging in JavaScript.
    ES2016 addressed that limitation by introducing
    <a href="https://developers.google.com/web/updates/2015/01/ES6-Template-Strings" target="_blank">Template Strings</a>.
</p>
<p>
    Unfortunately, browser support is still limited for that solution. Hence,
    we provide the
    <a href="http://helpcentral.componentone.com/nethelp/c1mvchelpers/wijmo.Module.html#format" target="_blank">format</a>
    function that works regardless of browser. The <b>format</b> function takes a
    format string with placeholders that contain variable names and format
    specifiers, and a data object that supplies the variables.
</p>

<p>
    For example:
</p>
<pre>wijmo.format('Welcome {name}! You have {miles:n0} miles in your account.', {
  name: 'Joe',
  miles: 2332123
})</pre>
<button id="btnFormat1" class="btn btn-default">
    Show Result
</button>

<br><br>
<p>
    Another example:
</p>
<pre>wijmo.format('{name}, thanks for being a customer since {date:D}.', {
  name: 'Joe',
  date: new Date()
})</pre>
<button id="btnFormat2" class="btn btn-default">
    Show Result
</button>