Skip to content

Commit 9b18af5

Browse files
author
Sruthi U
committed
Fixed code formatting
1 parent c6451c1 commit 9b18af5

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎Maths/MobiusFunction.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ export const mobiusFunction = (number) => {
2828
return primeFactorsArray.length !== new Set(primeFactorsArray).size
2929
? 0
3030
: primeFactorsArray.length % 2 === 0
31-
? 1
32-
: -1
31+
? 1
32+
: -1
3333
}

‎Maths/RowEchelon.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const rowEchelon = (matrix) => {
117117
let result = matrix
118118

119119
// Iterate through the rows (i) and columns (j) of the matrix.
120-
for (let i = 0, j = 0; i < numRows && j < numCols; ) {
120+
for (let i = 0, j = 0; i < numRows && j < numCols;) {
121121
// If the current column has all zero elements below the current row,
122122
// move to the next column.
123123
if (!checkNonZero(i, j, result)) {

‎Project-Euler/Problem013.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function largeSum(bignum) {
1313
let num = 0
1414

1515
while (pos--) {
16-
for (let i = nums.length; i--; ) {
16+
for (let i = nums.length; i--;) {
1717
num += +nums[i].charAt(pos)
1818
}
1919
ret = (num % 10) + ret

‎String/GenerateGUID.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const Guid = () => {
88
const pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
99
let currentDateMilliseconds = new Date().getTime()
1010
return pattern.replace(/[xy]/g, (currentChar) => {
11-
const randomChar = (currentDateMilliseconds + Math.random() * 16) % 16 | 0
11+
const randomChar = ((currentDateMilliseconds + Math.random() * 16) % 16) | 0
1212
currentDateMilliseconds = Math.floor(currentDateMilliseconds / 16)
1313
return (
1414
currentChar === 'x' ? randomChar : (randomChar & 0x7) | 0x8

0 commit comments

Comments
 (0)