This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8539734222673567065463550869546574495034888535765114961879601127067743044893204848617875072216249073013374895871952806582723184 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function multiply(x, y) { | |
if (BigInt(x) < 10n && BigInt(y) < 10n) { | |
return BigInt(x) * BigInt(y); | |
} | |
const xHalf = Math.floor(x.length / 2); | |
const yHalf = Math.floor(y.length / 2); | |
const a = String(x).substr(0, xHalf); | |
const b = String(x).substr(xHalf); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8.539734222673567e+126 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const number1 = 3141592653589793238462643383279502884197169399375105820974944592; | |
const number2 = 2718281828459045235360287471352662497757247093699959574966967627; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JS | |
const countButton = document.querySelect('.count); | |
const helloButton = document.querySelect('.hello); | |
function counting() { | |
let count = 0; | |
setInterval(function() { | |
count += 1; | |
console.log(count); | |
}, 1000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPalindrome(number) { | |
let divisor = 1; | |
// Find the appropriate divisor | |
// to extract the leading digit | |
while (number / divisor >= 10) { | |
divisor *= 10; | |
} | |
while (number !== 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPalindrome(sentence) { | |
sentence = sentence.toLowerCase().replace(/[^\w]/gi, ""); | |
const n = sentence.length; | |
const halfLength = Math.floor(sentence.length / 2); | |
for (let i = 0; i < halfLength; i++) { | |
if (sentence[i] !== sentence[n - 1 - i]) { | |
return false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPalindrome(word, start = 0, end = word.length - 1) { | |
// If there is only one character | |
if (start === end) { | |
return true; | |
} | |
// If first and last characters don't match | |
if (word[start] !== word[end]) { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPalindrome(word) { | |
word = word.toLowerCase(); | |
const n = word.length; | |
const halfLength = Math.floor(word.length / 2); | |
for (let i = 0; i < halfLength; i++) { | |
if (word[i] !== word[n - 1 - i]) { | |
return false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public filterTeamList(authService: AuthService, data) { | |
let filtered = data | |
.map((item) => { | |
const { userService, getUserID, logger } = authService; | |
const userId = getUserId(); | |
const { | |
user_id, | |
approver, | |
assigned_to_id, | |
draft, |
NewerOlder