/
Charlz_Klug
/
EloquentJavaScript
Обзор
Документация
Войти
/
Charlz_Klug
/
EloquentJavaScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
04_Data_Structures/073_Destructuring/destructuring.html
29 строк
675 B
Imil Ametov
Chapter 04. Destructuring.
03 апр 2026, 17:18
03 апр 2026, 17:18
c738aa2
Код
Авторство
О чём код?
<!DOCTYPE html> <html> <body> <h2>JavaScript. Methods.</h2> <p id="demo"></p> <script> function phi(table) { return (table[3] * table[0] - table[2] * table[1]) / Math.sqrt((table[2] + table[3]) * (table[0] + table[1]) * (table[1] + table[3]) * (table[0] + table[2])); } function phi2([n00, n01, n10, n11]) { return (n11 * n00 - n10 * n01) / Math.sqrt((n10 + n11) * (n00 + n01) * (n01 + n11) * (n00 + n10)); } console.log(phi([1, 2, 3, 4])); console.log(phi2([1, 2, 3, 4])); let {name} = {name: "Faraji", age: 23}; console.log(name); </script> </body> </html>