{"id":5840,"date":"2024-01-11T16:40:00","date_gmt":"2024-01-11T16:40:00","guid":{"rendered":"https:\/\/codehim.com\/?p=5840"},"modified":"2024-01-22T14:43:31","modified_gmt":"2024-01-22T09:43:31","slug":"javascript-scientific-calculator","status":"publish","type":"post","link":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/","title":{"rendered":"JavaScript Scientific Calculator"},"content":{"rendered":"<p>This JavaScript code snippet helps you to create a <a href=\"https:\/\/codehim.com\/html5-css3\/html-code-for-scientific-calculator\/\">scientific calculator<\/a> program. It comes with a simple user interface to perform exponents, log, natural log (ln), trig functions on numbers. Similarly, it can do basic mathematics including addition, subtraction, multiplication, and division.<\/p>\n<p>Whether you are working on an educational website template or want to make a general-purpose scientific calculator program, this code snippet might be helpful for you. You can integrate this calculator on your web project to help users to solve trigonometric functions or logarithms problems.<\/p>\n<h2>How to Create Scientific Calculator<\/h2>\n<p>1. Create the HTML structure for the scientific calculator as follows:<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;table class=\"calculator table\"&gt;\r\n&lt;thead&gt;\t\t\t\r\n    &lt;tr&gt;\r\n        &lt;td colspan=7&gt;\r\n            &lt;div class=\"output form-group\"&gt;\r\n                &lt;input type=\"text\" class=\"ans form-control\" readonly name=\"\"&gt;\r\n            &lt;\/div&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/thead&gt;\r\n&lt;tbody class=\"actions\"&gt;\t\t\r\n    &lt;tr&gt;\r\n        &lt;td colspan=3&gt;&lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='*('&gt;(&lt;\/button&gt;\t\t\t\t\r\n\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value=')'&gt;)&lt;\/button&gt;\t\t\t\t\r\n\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='%'&gt;%&lt;\/button&gt;\t\t\t\r\n\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='ce'&gt;CE&lt;\/button&gt;\t\t\t\t\r\n\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='inv'&gt;Inv&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='sin'&gt;sin&lt;\/button&gt;\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='ln'&gt;ln&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='7'&gt;7&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='8'&gt;8&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='9'&gt;9&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='\/'&gt;\u00f7&lt;\/button&gt;\t\t\t\t\r\n\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\t\t\t\r\n    &lt;tr&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='*3.14'&gt;\u03c0&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='cos'&gt;cos&lt;\/button&gt;\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='log'&gt;log&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='4'&gt;4&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='5'&gt;5&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='6'&gt;6&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='*'&gt;\t\u00d7&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n\r\n    &lt;tr&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='e'&gt;e&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='tan'&gt;tan&lt;\/button&gt;\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='radic'&gt;\u221a&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='3'&gt;3&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='2'&gt;2&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='1'&gt;1&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='-'&gt;-&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='exp'&gt;EXP&lt;\/button&gt;\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='x^2'&gt;x\u00b2&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='**'&gt;x^&lt;\/button&gt;\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='.'&gt;.&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn\" data-value='0'&gt;0&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='='&gt;=&lt;\/button&gt;\t\t\t\t\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n            &lt;button class=\"btn btn-op\" data-value='+'&gt;+&lt;\/button&gt;\r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/tbody&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>2. After that, use the following CSS to style the calculator interface.<\/p>\n<pre class=\"prettyprint linenums lang-css\">.calculator{\r\n\tborder:2px solid #ddd;\r\n\twidth: 280px;\r\n\tbox-sizing: border-box;\r\n\tmargin: 40px auto 0;\r\n\tfont-family: verdana;\r\n}\r\n.calculator .form-control{\r\n\theight: 60px;\r\n}\r\n.calculator .form-group{\r\n\tmargin-bottom: 0;\r\n}\r\n.calculator input[type=text]{\r\n\tfont-size: 1.5rem;\r\n\tcolor:#333;\r\n}\r\n.calculator .btn {\r\n\tfont-size: 1.5rem;\r\n\tcolor:#333;\r\n\twidth: 80px;\r\n}\r\n.calculator .btn-op {\r\n\tbackground-color: #999999;\r\n}\r\n<\/pre>\n<p>3. Finally, add the following JavaScript code for the scientific calculator between the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/script\" target=\"_blank\" rel=\"noopener\">&lt;script&gt; tag<\/a> before closing the body tag and done.<\/p>\n<pre class=\"prettyprint linenums lang-js\">const actions = document.querySelector('.actions');\r\n\tconst ans = document.querySelector('.ans');\r\n\tconsole.log(actions);\r\n\tconsole.log(ans);\r\n\tlet expression = '';\r\n\tlet a=0;\r\n\tactions.addEventListener('click', (e) =&gt; {\r\n\t\tconsole.log(e.target);\r\n\t\tconst value = e.target.dataset['value'];\r\n\r\n\t\tif(value !== undefined) {\r\n\t\t\t\/\/ I'm good to go.\r\n\t\t\tif(value == 'ce') {\r\n\t\t\t\texpression = '';\r\n\t\t\t\tans.value = 0;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(value == 'x^2'){\r\n\t\t\t\texpression =square();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(value == 'radic'){\r\n\t\t\t\texpression = Math.sqrt(expression);\r\n\t\t\t}\r\n\t\t\telse if(value == 'log'){\r\n\t\t\t\texpression = Math.log(expression);\r\n\t\t\t}\r\n\t\t\telse if(value == 'sin'){\r\n\t\t\t\texpression = Math.sin(expression);\r\n\t\t\t}\r\n\t\t\telse if(value == 'cos'){\r\n\t\t\t\texpression = Math.cos(expression);\r\n\t\t\t}\r\n\t\t\telse if(value == 'tan'){\r\n\t\t\t\texpression = Math.tan(expression);\r\n\t\t\t}\r\n\r\n\t\t\telse if(value == '=') {\r\n\t\t\t\tconst answer = eval(expression);\r\n\t\t\t\texpression = answer;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\texpression += value;\r\n\t\t\t}\r\n\r\n\t\t\tif(expression == undefined) {\r\n\t\t\t\texpression = '';\r\n\t\t\t\tans.value = 0;\r\n\t\t\t} else {\r\n\t\t\t\tans.value = expression;\r\n\t\t\t}\r\n\t\t\t\/\/ expression += value;\r\n\r\n\r\n\t\t}\r\n\r\n\t});\r\n\tconst square =()=&gt; {\r\n\t\t\treturn eval(expression*expression);\r\n\t}\r\n<\/pre>\n<p>That&#8217;s all! Hopefully, you have successfully integrated this scientific calculator into your project. If you have any questions or facing any issues, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to create a scientific calculator program. It comes with a simple user interface to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5859,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[63],"tags":[216],"class_list":["post-5840","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5-css3","tag-calculator"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Scientific Calculator &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Scientific Calculator &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T16:40:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T09:43:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"962\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Scientific Calculator\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\"},\"wordCount\":167,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png\",\"keywords\":[\"Calculator\"],\"articleSection\":[\"HTML5 &amp; CSS3\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\",\"url\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\",\"name\":\"JavaScript Scientific Calculator &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:31+00:00\",\"description\":\"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png\",\"width\":1280,\"height\":962,\"caption\":\"JavaScript Scientific Calculator\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML5 &amp; CSS3\",\"item\":\"https:\/\/codehim.com\/category\/html5-css3\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Scientific Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Scientific Calculator &#8212; CodeHim","description":"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Scientific Calculator &#8212; CodeHim","og_description":"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.","og_url":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-11T16:40:00+00:00","article_modified_time":"2024-01-22T09:43:31+00:00","og_image":[{"width":1280,"height":962,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Scientific Calculator","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:31+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/"},"wordCount":167,"commentCount":1,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png","keywords":["Calculator"],"articleSection":["HTML5 &amp; CSS3"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/","url":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/","name":"JavaScript Scientific Calculator &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:31+00:00","description":"Do you want to create a scientific calculator? well! here you will find a complete source code for JavaScript scientific calculator.","breadcrumb":{"@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/12\/javascript-scientific-calculator.png","width":1280,"height":962,"caption":"JavaScript Scientific Calculator"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/html5-css3\/javascript-scientific-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"HTML5 &amp; CSS3","item":"https:\/\/codehim.com\/category\/html5-css3\/"},{"@type":"ListItem","position":3,"name":"JavaScript Scientific Calculator"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":22543,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/5840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=5840"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/5840\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/5859"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=5840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=5840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=5840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}