JavaScript Sort an Array of Strings & Numbers | #28

preview_player
Показать описание
JavaScript Sort an Array of Strings & Numbers | #28

Courses:

HTML:

CSS:

Other videos

► How to Make Animated Portfolio Website Using HTML CSS & JS - Light & Dark Mode Website Tutorial:

► Responsive Personal Portfolio Website using HTML & CSS - How to Make a Website:

► Animated Portfolio Website Template in HTML CSS | Animated Personal Website - Responsive Design:

► How To Make A Website Using HTML CSS Bootstrap - Real Estate Website - Bootstrap Website Design:

► Responsive Ecommerce Website:

►CSS Button Hover Effect:

►CSS Loading Animation:

►Video Background Landing Page:

►Working JavaScript Clock:

►CSS Loading Animation Effects:

Instagram:
Рекомендации по теме
Комментарии
Автор

// Array Sorting

// sort an array of strings

const points = [4, 7, 30, 15, 9, 20];

// ascending order
points.sort(function (x, y) { return x - y });
console.log(points);

// descending order
points.sort(function (x, y) { return y - x });
console.log(points);

// minimum and maximum
points.sort(function (x, y) { return x - y });
console.log(points[0]);
- 1]);

webcontent