José Luis Sánchez Asked: 2020-02-12 15:55:29 +0800 CST 2020-02-12 15:55:29 +0800 CST 2020-02-12 15:55:29 +0800 CST Limit number of items to display 772 I have the following elements: I only want to show a certain number in the view.][ For example, now I only have 8 elements, I would like to only show 3. javascript 1 Answers Voted Best Answer Miguel Zarate 2020-02-12T16:07:34+08:002020-02-12T16:07:34+08:00 You just change the source of your list, with slice you can take only some elements of your list. let arrayElementos = [{elemento1}{elemento2}{elemento3}{elemnto4}{elemento5}]; let elementosMostrar= array.slice(0, 3); https://api.jquery.com/slice/ add how are you showing your list to modify it and show you the complete process.
You just change the source of your list, with slice you can take only some elements of your list.
https://api.jquery.com/slice/
add how are you showing your list to modify it and show you the complete process.