Solving this problem without using code, which at the time of obtaining this problem has not yet been considered in the lectures.
export const extractNumber = (s) => {
let r = '';
let arrayOfSymbols = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'];
for (let i=0; i < s.length; i++) {
if (arrayOfSymbols.includes(s[i])){
r = r + s[i];
};
}
return Number(r);
}