How to match text against regex in JavaScript

Regex
Last updated Nov 11, 2017
const result = "My age is 41".match(/\d+/);

console.log(result);
console.log(result[0]);
["41", index: 10, input: "My age is 41"]
41