aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2015-12-05 10:37:27 +0200
committerXhmikosR <[email protected]>2015-12-05 10:37:27 +0200
commit92d0a71fb60b57ba14b971c9a36b8c2b9575faa2 (patch)
tree1008ef1a54445c6be18c9172bcb2c74fb2a65c52 /js/src
parente94891fe2482c15d6c850de690ed3d78bea76e36 (diff)
parenta887a1207c3193a7389a4b84c22991e9a91d82a6 (diff)
downloadbootstrap-92d0a71fb60b57ba14b971c9a36b8c2b9575faa2.tar.xz
bootstrap-92d0a71fb60b57ba14b971c9a36b8c2b9575faa2.zip
Merge pull request #18391 from twbs/double-bitwise-not-comment
util.js: Add comment explaining ~~ trick
Diffstat (limited to 'js/src')
-rw-r--r--js/src/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/util.js b/js/src/util.js
index f4a584125..fccf6178c 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -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
},