There are more in the open source China blog, you can go there to see! Https://my.oschina.net/u/2998098/blog/1604028
Find the maximum difference of the following positive arrays,
Example: [1,2,4,55,223];
Idea: find the maximum and minimum
The methods Math.max (), Math.min (), max and min can only handle numbers, not arrays and strings;
... structural assignment
let a=[1,2,4,55,223]; let max=Math.max(...a); let min=Math.min(...a) console.log(max-min);//222