Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Counting digits
//nodejs v4.2.6 function count_digits(number) { number = "" + number; var obj = {}; for(var digit of number) { if(obj[digit]) { obj[digit] += 1; } else { obj[digit] = 1; } } return obj; } var n = 141157656072; console.log(count_digits(n)); console.log(JSON.stringify(count_digits(675436550467), undefined, 4));
run
|
edit
|
history
|
help
0
Rest Params
RFID TEST
Union of two sorted arrays
localhost:8080/?name=2017&lname=July
Holyboi
Add items on Set
Sort based on keys
fast function to reverse unsigned integer
problem_name
horsevalue