Commit a887a120 authored by Chris Rebert's avatar Chris Rebert
Browse files

util.js: Add comment explaining ~~ trick

[skip sauce]
[skip validator]
parent e458c7b0
Showing with 1 addition and 1 deletion
+1 -1
......@@ -99,7 +99,7 @@ const Util = (($) => {
getUID(prefix) {
do {
prefix += ~~(Math.random() * 1000000)
prefix += ~~(Math.random() * 1000000) // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix))
return prefix
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment