DEV Community

loading...

Discussion on: Top 20 JavaScript tips and tricks to increase your Speed and Efficiency

Collapse
techygeeky profile image
Kapil Raghuwanshi🖥 Author • Edited

Thanks for reminding this tip @martinmuzatko .

const array = [4,5,7,2,3];
Math.min(...array)
// Output: 2
Math.max(...array)
// Output: 7
Enter fullscreen mode Exit fullscreen mode
Collapse
boydevelopr profile image
FredDev

Please what tool is used to make this code snippet embedment on the pages?

Thread Thread
techygeeky profile image
Kapil Raghuwanshi🖥 Author

These are just code test only. Use 3 backticks before and after your code. Check the preview.