Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 1005 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 1005 Bytes

GPA Calculator - Javascript Library

How to use via CDN

Just add it to your website using script src to https://faatehsultan.github.io/gpa-calculator-js/gpa-calculator-js.js

Features

Follow the steps below use this library.

  1. Create an element with #validation_report for reporting invalid input errors.
  2. Call addSubject() to add subjects again and again.
  3. Optionally, set the required result precision by modifying resultPrecision variable. The default value is 5.
  4. After adding all the subjects, you can use either calculateGPA_viaDOM() or calculateGPA_viaValue() to get the result via DOM element #current_gpa_result (you need to create an element with this id) or via JS function return value respectively.
  5. You can also reset the application by calling resetGPA_app().

Terms of use

This project is licensed under MIT License. You can use this GPA Calculator anywhere in your own projects.

Developed by Syed Faateh Sultan Kazmi