This file contains 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> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>функция-конструктор Summator, которая создает объект с двумя методами: | |
sum(a,b) возвращает сумму двух значений | |
run() запрашивает два значения при помощи prompt и выводит их сумму, используя метод sum.</title> | |
</head> | |
<body> |
This file contains 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> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<script> | |
'Use Strict' | |
var calculator = { |
This file contains 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> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>функцию sumToAllArguments(...), которая возвращает сумму всех своих аргументов:</title> | |
</head> | |
<body> | |
<script> | |
'Use Strict' | |
function sumToAllArguments(){ |
This file contains 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> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>в функции отличить отсутствующий аргумент от undefined</title> | |
</head> | |
<body> | |
<script> | |
'Use strict' | |
function f(x){ |
This file contains 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> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Следующий код создает массив функций-стрелков shooters. | |
По замыслу, каждый стрелок должен выводить свой номер:</title> | |
</head> | |
<body> | |
<script> | |
'Use strict' |
This file contains 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> | |
<head> | |
<meta charset="UTF-8"> | |
<title>реализовать строковый буфер на функциях в JavaScript</title> | |
</head> | |
<body> | |
<script> | |
'Use strict' | |
function makeBuffer(){ |
This file contains 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> | |
<head> | |
<meta charset="UTF-8"> | |
<title>функцию formatDate(date), которая выводит дату date в формате дд.мм.гг:</title> | |
</head> | |
<body> | |
<script> | |
"use strict" | |
function formatDate(date) { |
This file contains 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> | |
<head> | |
<meta charset="UTF-8"> | |
<title>функцию formatDate(date), которая выводит дату date в формате дд.мм.гг:</title> | |
</head> | |
<body> | |
<script> | |
"use strict" | |
function formatDate(d){ |
This file contains 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> | |
<head> | |
<meta charset="UTF-8"> | |
<title> функцию getLastDayInMonth(year, month), | |
которая возвращает последний день месяца.</title>use soft Wraps | |
</head> | |
<body> | |
<script> | |
"use strict"; |
This file contains 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> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Какое число месяца было 100 дней назад? Какой день недели?</title> | |
</head> | |
<body> | |
<script> | |
"use strict"; | |
function getWeekDay(date) { |
NewerOlder