Skip to content

Commit e55f745

Browse files
author
bdcoder2
authored
Add files via upload
1 parent a7f6a89 commit e55f745

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

v170/ex1/tester.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ class tester {
245245
else {
246246
n = Math.round(elapsed_ms_to_create_map_markers * 100) / 100;
247247
}
248-
s = '<span style="color:#008000"><b>Data point creation is ' + n + ' times faster</b></span> than creating Google map markers.';
248+
if (n > 1) {
249+
s = '<span style="color:#008000"><b>Data point creation is ' + n + ' times faster</b></span> than creating Google map markers.';
250+
}
249251
}
250252
else if (elapsed_ms_to_create_data_points > elapsed_ms_to_create_map_markers) {
251253
if (elapsed_ms_to_create_map_markers > 0) {
@@ -254,7 +256,9 @@ class tester {
254256
else {
255257
n = Math.round(elapsed_ms_to_create_data_points * 100) / 100;
256258
}
257-
s = '<span style="color:#FF0000"><b>Data point creation is ' + n + ' times slower</b></span> than creating Google map markers.';
259+
if (n > 1) {
260+
s = '<span style="color:#FF0000"><b>Data point creation is ' + n + ' times slower</b></span> than creating Google map markers.';
261+
}
258262
}
259263
$('#ts4').html(s);
260264
}

0 commit comments

Comments
 (0)