This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://komito.net/komito.js" async></script> | |
| <script> | |
| // The default configuration can be omitted and only changed properties can be included. | |
| var _komito = _komito || { | |
| 'trackTwitter': 1, // Tracks Twitter events if widget is presented on page. | |
| 'trackFacebook': 1, // Tracks Facebook events if widget is presented on page. | |
| 'trackLinkedIn': 1, // Tracks LinkedIn events if plugin is presented on page. | |
| 'trackDownloads': 1, // Tracks files download links. | |
| 'trackOutbound': 1, // Tracks outbound links. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * +------------------------------------+ | |
| * | FIBONACCI TABLE | | |
| * +------------------------------------+ | |
| * | n 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | |
| * | xn 0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | | |
| * +------------------------------------+ | |
| * | |
| * @see https://en.wikipedia.org/wiki/Big_O_notation | |
| * @see https://en.wikipedia.org/wiki/Fibonacci_number#Sequence_properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Computes the factorial of a given non-negative integer using iterative solution. | |
| * @param {number} n The positive integer. | |
| * @return {number} Returns a factorial of 'n'. | |
| * @see https://en.wikipedia.org/wiki/Factorial | |
| */ | |
| function factorial(n) { | |
| var result = 1; | |
| for (var i = 1; i <= n; ++i) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var n = 1; | |
| console.log(n.toFixed(2)); | |
| // To change the number directly: | |
| // 1. Use parentheses: | |
| console.log((1).toFixed(2)); | |
| // 2. Use two dots: | |
| console.log(1..toFixed(2)); | |
| // Number binary representation: | |
| console.log(20..toString(2)); |
NewerOlder