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
| const grades = { | |
| Junior: 'junior', | |
| Middle: 'middle', | |
| Senior: 'senior', | |
| }; | |
| const bonuses = { | |
| 'C++': 100, | |
| Rust: 150, | |
| default: 50, |
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
| window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
| var context = new AudioContext(); | |
| var analyser = context.createAnalyser(); | |
| var source; | |
| var freqData; | |
| var samples = 128; | |
| var initStream = function(stream) { | |
| analyser.fftSize = samples; |
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
| const magicBook = { | |
| recipes: { | |
| golem: { | |
| bone: 10, | |
| stone: 100, | |
| nail: 100, | |
| poo: 53 | |
| }, | |
| littleDevil: { | |
| lava: 10, |
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
| describe('createMonster', () => { | |
| it('should create monster object', () => { | |
| const monster = { | |
| id: 1, | |
| userId: 1, | |
| name: 'Ktulhu', | |
| superpower: 'Oops', | |
| area: 'Cave', | |
| }; | |
| expect(createMonster(1, 'Ktulhu', 'Oops', 'Cave')).to.deep.equal(monster); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Functions</title> | |
| <script | |
| src="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.0.1/mocha.min.js" | |
| integrity="sha512-ApK//o0cQFCph3kX20wrHlNzlitDH4TydeGc7yn2OiM2Bymv9abvskmtLcvJ1EmAcgigVteKHAhF/DWY6ybYag==" | |
| crossorigin="anonymous" |