You Deserve It!


#1


**console.log('Your bill is '+cashRegister.total.toFixed(2));**

i just wanted to ask about the code above.Im done in the "Building a Cash Register" activity and i notice something changed in the code above.
".toFixed(2)"? whats this for? i didnt put those codes and im curious what those code for.

thanks.


#2

The toFixed() method formats a number using fixed-point notation

see this docs


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.