Message from JavaScript discussions

October 2020

— banofbot

— 

🔫 Stella Fixsal has been kicked — the only way to get this user back is for admins to manualy unban in chat settings.

Voters who chose to kick:
determin1st, ooopsieded, TRGWII, Rudy94, Chiagoziem
Powered by Todorant

— Let count = (n) => {
let c = n.toString().split()
let a = c.filter(i => !isNaN(i))
a = a.join()
return a;
}

console.log(count(-2345))


🤔 how do i exclude (operator) to get the length 4

Message permanent page

— .replace('-', '') after toString

— Also. You can chain all the functions.

— No need for undescriptive variable names like c or a ;)

— Math.abs(n).toString()

— Ya worked

— Okk i'll see

— Better :)

— I didn't read about abs func. time to meet MDN

— const numDigits = n => Math.abs(n).toString().filter(k => !isNaN(k)).length