Skip to content

Assignment to constant variable.#1

Open
djiworks wants to merge 1 commit into
danke77:masterfrom
djiworks:patch-2
Open

Assignment to constant variable.#1
djiworks wants to merge 1 commit into
danke77:masterfrom
djiworks:patch-2

Conversation

@djiworks

@djiworks djiworks commented Jan 7, 2020

Copy link
Copy Markdown
// For each octet
  for (let i = 0; i < numOctets; i++) {
    // Ready as hex string
    let str = data.readUInt8(i).toString(16); // use let instead of const because its value can change depending on length
    // If it's only 1 byte, add 0 to front
    if (str.length == 1) str = '0' + str;
    // Put in array
    bytes.push(str);
  }

```
// For each octet
  for (let i = 0; i < numOctets; i++) {
    // Ready as hex string
    let str = data.readUInt8(i).toString(16); // use let instead of const because its value can change depending on length
    // If it's only 1 byte, add 0 to front
    if (str.length == 1) str = '0' + str;
    // Put in array
    bytes.push(str);
  }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant