![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to update % printed 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