summaryrefslogtreecommitdiff
path: root/js/src/Ice/Struct.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-03-27 12:32:02 +0200
committerJose <jose@zeroc.com>2018-03-27 12:32:02 +0200
commitc21ef10cef69a8549491ce0bf324da6c4412399a (patch)
treeb4de3c62defbaf4028a3431234df44914366a1e5 /js/src/Ice/Struct.js
parentExtra fixes for hold test to break loops in case of error (diff)
downloadice-c21ef10cef69a8549491ce0bf324da6c4412399a.tar.bz2
ice-c21ef10cef69a8549491ce0bf324da6c4412399a.tar.xz
ice-c21ef10cef69a8549491ce0bf324da6c4412399a.zip
JavaScript ESLINT prefer const usage
https://eslint.org/docs/rules/prefer-const
Diffstat (limited to 'js/src/Ice/Struct.js')
-rw-r--r--js/src/Ice/Struct.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/src/Ice/Struct.js b/js/src/Ice/Struct.js
index f302ec4c252..96a4a2a3bb2 100644
--- a/js/src/Ice/Struct.js
+++ b/js/src/Ice/Struct.js
@@ -39,10 +39,10 @@ function equals(other)
return false;
}
- for(let key in this)
+ for(const key in this)
{
- let e1 = this[key];
- let e2 = other[key];
+ const e1 = this[key];
+ const e2 = other[key];
if(typeof e1 == "function")
{
continue; // Don't need to compare functions
@@ -58,9 +58,9 @@ function equals(other)
function clone()
{
const other = new this.constructor();
- for(let key in this)
+ for(const key in this)
{
- let e = this[key];
+ const e = this[key];
if(e === undefined || e === null)
{
other[key] = e;
@@ -116,9 +116,9 @@ function memberHashCode(h, e)
function hashCode()
{
let h = 5381;
- for(let key in this)
+ for(const key in this)
{
- let e = this[key];
+ const e = this[key];
if(e === undefined || e === null || typeof e == "function")
{
continue;