Why do you sometimes make mistakes when using toFixed?

var astat1100.2222;
return a.toFixed (2);

vue.js:584 [Vue warn]: Error in render: "TypeError: a.toFixed is not a function"

Mar.04,2021

I wonder, is Number.prototype.toFixed rewritten somewhere?

// ... 
Number.prototype.toFixed = null;
// ...

var a = 1100.22222; 
console.log(Number.prototype.toFixed); // 
a.toFixed(2); // 
The

complete code to see whether this is a development mode or a production mode


encountered a similar problem with Anglar before, when someone rewrote the prototype method.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b65e-2c288.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b65e-2c288.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?