Skip to content

Commit 9446d1c

Browse files
var replaced with const in examples.js
1 parent d6a32c1 commit 9446d1c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/examples/examples.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ $(function () {
1515
});
1616

1717
$(function () {
18-
var timer = new Timer();
18+
const timer = new Timer();
1919
timer.start();
2020
timer.addEventListener('secondsUpdated', function (e) {
2121
$('#basicUsage').html(timer.getTimeValues().toString());
2222
});
2323
});
2424

2525
$(function () {
26-
var timer = new Timer();
26+
const timer = new Timer();
2727
timer.start({ precision: 'seconds' });
2828
timer.addEventListener('secondsUpdated', function (e) {
2929
$('#gettingValuesExample .days').html(timer.getTimeValues().days);
@@ -41,7 +41,7 @@ $(function () {
4141
});
4242

4343
$(function () {
44-
var timer = new Timer();
44+
const timer = new Timer();
4545

4646
$('#chronoExample .startButton').click(function () {
4747
timer.start();
@@ -73,7 +73,7 @@ $(function () {
7373
});
7474

7575
$(function () {
76-
var timer = new Timer();
76+
const timer = new Timer();
7777
timer.start({ precision: 'seconds', startValues: { seconds: 90 }, target: { seconds: 120 } });
7878
$('#startValuesAndTargetExample .values').html(timer.getTimeValues().toString());
7979
timer.addEventListener('secondsUpdated', function (e) {
@@ -86,7 +86,7 @@ $(function () {
8686
});
8787

8888
$(function () {
89-
var timer = new Timer();
89+
const timer = new Timer();
9090
timer.start({ countdown: true, startValues: { seconds: 30 } });
9191
$('#countdownExample .values').html(timer.getTimeValues().toString());
9292
timer.addEventListener('secondsUpdated', function (e) {
@@ -98,7 +98,7 @@ $(function () {
9898
});
9999

100100
$(function () {
101-
var timer = new Timer();
101+
const timer = new Timer();
102102
timer.start({
103103
callback: function (timer) {
104104
$('#callbackExample .values').html(
@@ -109,15 +109,15 @@ $(function () {
109109
});
110110

111111
$(function () {
112-
var timer = new Timer();
112+
const timer = new Timer();
113113
timer.start({ precision: 'secondTenths' });
114114
timer.addEventListener('secondTenthsUpdated', function (e) {
115115
$('#secondTenthsExample .values').html(timer.getTimeValues().toString(['hours', 'minutes', 'seconds', 'secondTenths']));
116116
});
117117
});
118118

119119
$(function () {
120-
var timer = new Timer({ countdown: true, startValues: { seconds: 5 } });
120+
const timer = new Timer({ countdown: true, startValues: { seconds: 5 } });
121121

122122
timer.start({ startValues: { seconds: 30 }, target: { seconds: 10 } });
123123
$('#defaultParamsExample .values').html(timer.getTimeValues().toString());

0 commit comments

Comments
 (0)