//Build a function that returns an array of integers from n to 1 where n>0.Example : n=5 --> [5,4,3,2,1]
const reverseSeq = n => {
let arr = [];
for(let i=n; i>0;i--){
arr.push(i)
} return arr;
};
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter