What’s going on in this method
parseFloat('123.234').toFixed(2);
How to create such functions on the results of which we can call other functions? Can someone provide the internal structure of such methods? Is this method chaining?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This indeed is method chaining.
parseFloatreturns aNumber object, which has a methodtoFixed.This is a basic example to show you how it works: