Skip to content

Instantly share code, notes, and snippets.

// данные о конкретной резервации
{
"checkin": 176,
"checkout": 178,
"features": ["breakfast"],
"rooms": 1
}
// должен получиться такой ответ (то что вернет функция)
[
@shevchenkonik
shevchenkonik / index.js
Last active November 6, 2023 14:56
`let` vs `var` benchmark
import { Bench } from '@probe.gl/bench';
const bench = new Bench()
.group('Utility tests')
.add('let', () => {
let result = []
for (let i = 0; i < 10000; i++) {
result.push(i)
}
@shevchenkonik
shevchenkonik / gi.md
Last active June 14, 2019 16:08
The difference between dependencies and devDependencies in Node Package Manager

When using NPM (Node Package Manager) you must see file package.json. In this file described information about package and you can see a list of all dependencies. Dependencies are divided into two types: dependencies and devDependencies. The difference between these two types is dependencies are packages that needed for production environment while devDependencies are packages which are only needed for local environment & test's. Dependencies (for runtime): Axios, Express, React, etc. DevDependencies (for local environment & tests): Babel, Webpack, ESLint, Jest, etc. To add dependencies to your project you need to do an npm install -save (shortcut: npm i -S) and if you want to add devDependencies you can run the following command: javascript npm install --save-dev (shortcut: javascript npm i -D).

var outputValue = 'placebo';
(function() {
console.log(outputValue); // undefined
var outputValue = 'radiohead';
}());