diff options
| author | XhmikosR <[email protected]> | 2015-12-05 10:37:27 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2015-12-05 10:37:27 +0200 |
| commit | 92d0a71fb60b57ba14b971c9a36b8c2b9575faa2 (patch) | |
| tree | 1008ef1a54445c6be18c9172bcb2c74fb2a65c52 /js/src | |
| parent | e94891fe2482c15d6c850de690ed3d78bea76e36 (diff) | |
| parent | a887a1207c3193a7389a4b84c22991e9a91d82a6 (diff) | |
| download | bootstrap-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.js | 2 |
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 }, |
