So if for example there was an array x = [34,10,60,5,3] how do I convert this to an array that's in octal?
You can do the following,
x = [34,10,60,5,3] res = x.map(item => parseInt(item.toString(8))); console.log(res);