> For the complete documentation index, see [llms.txt](https://appsecurity.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appsecurity.gitbook.io/devops/ppc/ppc-langs/frontend/js-ts/javascript/basic-js.md).

# Basic JS

### null and undefined

`undefined` — переменной не было присвоено значение

`null` — намеренно сделали переменную пустой

### use strict

директива, которая заставляет ваш код исполняться в строгом режиме

### Desctructuring (деструктуризация объекта)

Это способ извлечения значений из объектов и массивов:

```javascript
// array
let [,b] = "a b".split(" ")
// object
let t = {a: "", b: 1, c: true}
let {a: somea, b: someb, c} = t
console.log(somea, someb, c)

let {c, ...props} = t
```

### this

This указывает на объект, который выполняет текущий кусок JS-кода
