@@ -49,7 +49,7 @@ Difficulty: **Easy**
4949``` javascript
5050let sum = 0
5151
52- for (let digit of n .toString ()) {
52+ for (const digit of n .toString ()) {
5353 sum += Math .pow (Number (digit), 2 )
5454}
5555
@@ -64,7 +64,7 @@ var isHappy = function (n, appearedNums) { // 0
6464 appearedNums || = new Set () // 1
6565 let sum = 0
6666
67- for (let digit of n .toString ()) {
67+ for (const digit of n .toString ()) {
6868 sum += Math .pow (Number (digit), 2 )
6969 }
7070
@@ -144,7 +144,7 @@ var isHappy = function (n, appearedNums) {
144144 appearedNums || = new Set ()
145145 let sum = 0
146146
147- for (let digit of n .toString ()) {
147+ for (const digit of n .toString ()) {
148148 sum += Math .pow (Number (digit), 2 )
149149 }
150150
@@ -258,7 +258,7 @@ public class Solution
258258``` javascript
259259let sum = 0
260260
261- for (let digit of n .toString ()) {
261+ for (const digit of n .toString ()) {
262262 sum += Math .pow (Number (digit), 2 )
263263}
264264
@@ -273,7 +273,7 @@ var isHappy = function (n, appearedNums) {
273273 appearedNums || = new Set () // 1
274274 let sum = 0
275275
276- for (let digit of n .toString ()) {
276+ for (const digit of n .toString ()) {
277277 sum += Math .pow (Number (digit), 2 )
278278 }
279279
0 commit comments