Skip to content

En: Skillbox_JavaScript-module-6-loops_and_arrays_task-2 Ru: Skillbox_JavaScript-модуль-6-циклы_и_массивы_задание-2

Notifications You must be signed in to change notification settings

claritycraft/Skillbox_JavaScript-module-6-loops_and_arrays_task-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

En: Skillbox_JavaScript-module-6-loops_and_arrays_task-2

Ru: Skillbox_JavaScript-модуль-6-циклы_и_массивы_задание-2

Please give this project a star ⭐ if you found it interesting

Пожалуйста, поставьте звезду ⭐ если этот проект Вас заинтересовал

En:

Task 2

Finding the Minimum and Maximum Numbers in an Array and Displaying Them on the Page You have an array of numbers called numbers, which contains several elements. Display all the elements of the array on the page. Also, add functionality to find the minimum and maximum numbers in the array and show their values on the page when the corresponding buttons are clicked

Task Steps:

  • Create a paragraph with the class "all-elements" where all array elements will be displayed, separated by commas.
  • Create two buttons with the classes "min" and "max". When clicked, they should find the minimum and maximum numbers in the array.
  • Create two elements with the classes "minNumber" and "maxNumber" where the found minimum and maximum numbers will be displayed.
  • Use JavaScript to output all array elements inside the "all-elements" element using the textContent property and a for loop.

Ru:

Задача 2

Поиск минимального и максимального чисел в массиве и их отображение на странице У вас есть массив чисел numbers, который содержит несколько элементов. Выведите все элементы массива на странице. Также добавьте возможность находить минимальное и максимальное числа в массиве и отображать их значения на странице при нажатии соответствующих кнопок.

Алгоритм выполнения задачи:

  • Создайте параграф с классом "all-elements", в котором будут отображены все элементы массива через запятую.
  • Создайте две кнопки с классами "min" и "max", при нажатии на которые будут находиться минимальное и максимальное числа в массиве.
  • Создайте два элемента с классами "minNumber" и "maxNumber", куда будут выводиться найденные минимальное и максимальное числа соответственно.
  • С помощью JavaScript выведите все элементы массива внутрь элемента с классом "all-elements" с использованием метода textContent и цикла for.

En: Technologies Used

Ru: Используемые технологии

  • HTML5
  • JavaScript

En: License

This project is for educational purposes only. Do not copy or redistribute without permission.

Ru: Лицензия

Этот проект предназначен исключительно для образовательных целей. Не копируйте и не распространяйте без разрешения.

En: Demonstration

Ru: Демонстрация

6_2-1

About

En: Skillbox_JavaScript-module-6-loops_and_arrays_task-2 Ru: Skillbox_JavaScript-модуль-6-циклы_и_массивы_задание-2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published