
Posted on: 9 months ago
What is the use of valueOf() method in JavaScript?
JavaScript, JavaScript Method, Method, valueOf()
41 | 0 | 0
The valueOf() method returns a number as a number.
let a = 456;
console.log(a.valueOf()); // 456
console.log((456).valueOf()); // 456
console.log((426 + 30).valueOf()); // 456
Welcome to CodePits.
CodePits provide a collection of tutorials about many programming languages like PHP, Laravel Framework, Codeigniter Framework, Mysql Database, Bootstrap Front-end Framework, Jquery, Node JS, Ajax Example, APIs, CURL Example, Composer Packages Example, AngularJS, Ionic Framework, etc. 🙌
Other Posts
Categories
Tags
Comment
Comments (0)
🤔
No comments yet, be the first to help
load more