Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 5.23 KB

File metadata and controls

65 lines (50 loc) · 5.23 KB

icons8-calculator-28 Scientific Calculator Using TypeScript typescript-22

icons8-programming-flag-28 Languages has been used for the project

My Skills

🚀 Live Demonstraion

icons8-about-28 What is typescript

  • 💻 TypeScript is a programming language developed by Microsoft 🚀 that is a typed superset of JavaScript 🌐. It offers features such as static typing 🙅‍♂️, interfaces 🤝, classes 🏫, modules 📦, and decorators 🎀, making it easier to write and maintain large-scale applications. TypeScript code is transpiled to JavaScript code 🔄 and can run in any JavaScript environment 🌍, including web browsers 🌐 and Node.js 🚀. It has excellent tooling support 🛠️ and is a popular choice for building complex applications 🏗️.

icons8-installing-updates-22 Complete Inilizatoin Of TypeScript

Step 1 : install Ts in your IDE

npm install -g typescript

Write this command in yout IDE's Terminal

Step 2 : Create src and build folder for your project

Screenshot from 2023-03-15 14-57-16

Step 3 : Put all the html and js file inside the build folder & all the typescript file will be at the src folder

Screenshot from 2023-03-15 15-02-17

Step 4 : Create a config file Using this command

tsc --init

it will create tsconfig.json file

Step 5 : Modify mantioned code in tsconfig.json

"rootDir": "./initializeTS/src", // here you give your src folder path
"outDir": "./initializeTS/build/js", // Here you give your jsvascript file path and 'build/js' will create js folder inside the build folder

// Add this line of code at the end of the tsconfig.json file
,
  "include": [
    "initializeTS/src"
  ]

Step 5 : run this command after make changes in json file it will update all the changes of that are maked in json file.

tsc -w 

icons8-source-code-28 Some Use-cases Of Typescript In This Project

  • The TypeScript approach used in this code is to add optional type annotations to variables, parameters, and return types. This allows the compiler to catch type-related errors at compile time instead of runtime, which can help prevent bugs and improve the reliability of the code.

Screenshot from 2023-03-23 18-31-14

  • In this code, the TypeScript approach used is to add type annotations to the variable i and to use the for loop to iterate through a section of an array based on the values of two variables, parenthesisCounter and finalParenthesis. The if statement inside the loop checks if the current element in the array is either a multiplication or division operator, and sets the toLoop variable to true if it is. If the element is not a multiplication or division operator, the toLoop variable is set to false. The toLoop variable is used later in the code to determine whether to continue looping or not.

Screenshot from 2023-03-23 18-39-12

icons8-about-28 About Project

  • 🔢 A TypeScript scientific calculator is a program written in TypeScript language that allows users to perform mathematical operations.

  • ➕ ➖ ✖️ ➗ It provides functions for basic arithmetic operations such as addition, subtraction, multiplication, and division.

  • 🧮 It also includes more advanced operations like exponentiation, trigonometric functions, and logarithmic functions.

  • 🖥️ The calculator has a user-friendly and intuitive interface with buttons for all the common mathematical operations.

  • ⏬⏫ It features bracket operations, allowing users to group calculations and prioritize their execution order.

  • 💾 The calculator includes a memory function that allows users to store values for later use in calculations.

  • 💻 The input and output are displayed clearly on the screen for easy readability.

  • 🔬 The TypeScript scientific calculator is a powerful tool for students, researchers, and professionals in various fields to perform a wide range of mathematical calculations.