Share your repls and programming experiences

← Back to all posts
#Weekly 5 JS
h
AdCharity (1362)

Overview

:l It's not very ingenious but it works like a charm (plus js allows me to do some funky things).

Features

  • one liner (could be shorter if I removed the while loop)
  • supports decimals and negative numbers because JS
  • doesn't use bitwise operators

Old Version

This one shouldn't be judged, but for future reference: https://repl.it/@AdCharity/Weekly5JS#index.js
It uses bitwise operators (which aren't unique :l)

Comments
hotnewtop
RohanRajagopal (1)

so much cleaner and simpler than my python mess

AdCharity (1362)

@RohanRajagopal thanks! I'm so glad I found out about bitwise operators I bypassed so much work