-
Создать пустой массив
-
Добавить в него 100 целых чисел от 1 до 100 с помощью метода
Math.random()
-
Написать функцию поиска и вывода в консоль максимального или минимального элемента. Функция должна называться
findMinMax
, принимать в параметрах массив для поиска и строку, определяющую действие функции. Функция должна возвратить найденный элемент Пример использования функции
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
;(function(){ | |
var limited = function(delay,functionToFreeze){ | |
if(typeof delay === 'function'){ | |
functionToFreeze = delay; | |
delay = 20; | |
} | |
var notExecutingNow=true, | |
savedArguments, | |
self, |
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
sourceImage = undefined | |
convertedImage = undefined | |
context = undefined | |
window.onload = -> | |
sourceImage = document.getElementById 'source-image' | |
convertedImage = document.getElementById 'converted-image' | |
context = convertedImage.getContext '2d' | |
convertedImage.width = sourceImage.width |
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
(function($){ | |
$.prototype.fallingText = function(intervalBetweenFalls, fallDuration){ | |
var $spansForEffect, | |
spansIndexes, | |
currentIndex = 0, | |
counter = 0; | |
setArrayShuffleMethod(); |
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>Test</title> | |
<style> | |
h1{ | |
color:darkblue; | |
background-color: aquamarine; | |
} |
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
$('document').on('submit', 'form', submitMany); | |
function submitMany(){ | |
var form = $(this); | |
if(validateAction(form.prop('action'))){ | |
alert('!!!'); | |
} |
#Задание слайдер(карусель)
Написать циклический слайдер для элементов списка. Шаблон верстки для слайдера
<div data-slider>
<button type="button">prev</button>
<ul>
<li><a href="#">Link 1</a></li>
<a href="#">Link 2</a>
Сделать новое приложение и засетапить webpack. https://webpack.js.org/guides/getting-started/#basic-setup Создать простую html страничку с формой, содержащей поля и кнопку сабмит.
Поля формы c необходимыми проверками:
First Name(min length 2, max length 20, required),
Last Name(min length 2, max length 20, required),
Email(valid email, required),
Phone(+38(000)000-00-00, required)
Age(number, range 18-120, optional) //check range only if present
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
[ | |
{ | |
id: 'YhWRSEdBXUE', | |
description: null, | |
urls: { | |
raw: 'https://images.unsplash.com/photo-1601758228041-f3b2795255f1?ixid=MXwxODg5MjR8MXwxfGFsbHwxfHx8fHx8Mnw&ixlib=rb-1.2.1', | |
full: 'https://images.unsplash.com/photo-1601758228041-f3b2795255f1?crop=entropy&cs=srgb&fm=jpg&ixid=MXwxODg5MjR8MXwxfGFsbHwxfHx8fHx8Mnw&ixlib=rb-1.2.1&q=85', | |
regular: 'https://images.unsplash.com/photo-1601758228041-f3b2795255f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MXwxODg5MjR8MXwxfGFsbHwxfHx8fHx8Mnw&ixlib=rb-1.2.1&q=80&w=1080', | |
small: 'https://images.unsplash.com/photo-1601758228041-f3b2795255f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MXwxODg5MjR8MXwxfGFsbHwxfHx8fHx8Mnw&ixlib=rb-1.2.1&q=80&w=400', | |
thumb: 'https://images.unsplash.com/photo-1601758228041-f3b2795255f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MXwxODg5MjR8MXwxfGFsbHwxfHx8fHx8Mnw&ixlib=rb-1.2.1&q=80&w=200' |