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
let oldData = { | |
age: 3, | |
name: "dudeson", | |
height: 70, | |
type: 3, | |
address: { | |
city: 'Manila', | |
street: 'street 66', | |
province: { | |
district: { |
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
let testArr = [...Array(23).keys()] | |
function chunk(arr, size) { | |
let chunkie = [] | |
let newConstruct = [] | |
for (let i in arr) { | |
if (chunkie.length < size - 1) { | |
chunkie.push(arr[i]) | |
if (arr.length === parseInt(i) + 1) { | |
newConstruct.push(chunkie) |
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 alphabetCounter(counter) { | |
counter = Math.abs(counter) | |
counter = !counter ? 1 : counter | |
let remainder = counter % 26 | |
let quotient = Math.floor(counter / 26) | |
let result = remainder ? String.fromCharCode(64 + remainder) : (--quotient, 'Z'); | |
return quotient ? alphabetCounter(quotient) + result : result; | |
} |
OlderNewer