
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Update Printed Output to Console from MongoDB
To update and print to console from MongoDB script, create a variable and then use the print() method.
Let us first create a variable −
> var amount=10.58945;
Here is the query to update % printed to console −
> var amount=10.58945; > print(amount.toFixed(2)+" %");
This will produce the following output −
10.59 %
Advertisements