{"id":9316,"date":"2024-01-14T18:01:00","date_gmt":"2024-01-14T18:01:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9316"},"modified":"2024-01-22T16:02:15","modified_gmt":"2024-01-22T11:02:15","slug":"water-intake-calculator-in-javascript","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/","title":{"rendered":"Water Intake Calculator in JavaScript"},"content":{"rendered":"<p>This JavaScript calculator allows you to track and manage your daily water intake. It features a user-friendly interface that helps you visualize your progress and achieve your hydration goals. With a simple click on various cup sizes, you can log your water consumption. The big cup display shows the remaining water in liters and the percentage of your daily goal achieved.<\/p>\n<p>Additionally, there&#8217;s a convenient reset button to start over. This code is a handy tool to monitor and maintain your daily water intake effectively.<\/p>\n<h2>How to Create a Water Intake Calculator In JavaScript<\/h2>\n<p>1. To get started, create an HTML document and set up the basic structure. Make sure to include the necessary external resources using the provided CDN links in the <code>&lt;head&gt;<\/code> section of your HTML file.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;link rel='stylesheet' href='https:\/\/fonts.googleapis.com\/css?family=Ubuntu&amp;amp;display=swap'&gt;\r\n&lt;link rel='stylesheet' href='https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.0\/css\/bootstrap.min.css'&gt;\r\n<\/pre>\n<p>2. Within your body element, add the following HTML code. This code creates the interface for the Water Intake Calculator, including a header, a big cup display, and a section for logging water consumption.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;!-- header section --&gt;\r\n&lt;header id=\"header\"&gt;\r\n\t&lt;div class=\"container mb-5\"&gt;\r\n\t\t&lt;div class=\"row height align-items-center\"&gt;\r\n\t\t\t&lt;div class=\"col text-center mx-auto\"&gt;\r\n\t\t\t\t&lt;h2 class=\"font-weight-bold\"&gt;Track water intake&lt;\/h2&gt;\r\n\t\t\t\t&lt;h5&gt;Today's goal is : 3 litres&lt;\/h5&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/header&gt;\r\n&lt;!-- end of header section --&gt;\r\n\r\n&lt;!-- main section --&gt;\r\n&lt;section id=\"main\"&gt;\r\n\t&lt;div class=\"container\"&gt;\r\n\t\t&lt;div class=\"row align-items-end\"&gt;\r\n\t\t\t&lt;!-- big cup --&gt;\r\n\t\t\t&lt;div class=\"col-md-4 text-center d-flex justify-content-center\"&gt;\r\n\t\t\t\t&lt;div class=\"big-cup\"&gt;\r\n\t\t\t\t\t&lt;div class=\"remained d-flex flex-column mt-5\"&gt;\r\n\t\t\t\t\t\t&lt;p class=\"litres font-weight-bold\"&gt;3.00 L&lt;\/p&gt;\r\n\t\t\t\t\t\t&lt;p class=\"remaining-text\"&gt;Remaining&lt;\/p&gt;\r\n\t\t\t\t\t\t&lt;div class=\"percentage font-weight-bold rounded align-self-center mt-5\"&gt;\r\n\t\t\t\t\t\t\t0 %\r\n\t\t\t\t\t\t&lt;\/div&gt;\r\n\t\t\t\t\t&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;!-- end of big cup --&gt;\r\n\r\n\t\t\t&lt;!-- logging area --&gt;\r\n\t\t\t&lt;div class=\"col-md-8 text-center\"&gt;\r\n\t\t\t\t&lt;h3 class=\"heading\"&gt;Log quantity of water :&lt;\/h3&gt;\r\n\t\t\t\t&lt;div class=\"cups d-flex justify-content-around align-items-end\"&gt;\r\n\t\t\t\t\t&lt;div class=\"small-cup cup-250\"&gt;250 ml&lt;\/div&gt;\r\n\t\t\t\t\t&lt;div class=\"small-cup cup-500\"&gt;500 ml&lt;\/div&gt;\r\n\t\t\t\t\t&lt;div class=\"small-cup cup-750\"&gt;750 ml&lt;\/div&gt;\r\n\t\t\t\t\t&lt;div class=\"small-cup cup-1000\"&gt;1000 ml&lt;\/div&gt;\r\n\t\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;!-- end of logging area --&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n\r\n\t&lt;div class=\"container\"&gt;\r\n\t\t&lt;div class=\"row mt-4 justify-content-center\"&gt;\r\n\t\t\t&lt;button class=\"btn btn-lg reset-button\"&gt;Reset all logs&lt;\/button&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/section&gt;\r\n&lt;!-- end of main section --&gt;<\/pre>\n<p>3. Now, apply the following CSS styles to make the application visually appealing and functional. The CSS code enhances the design and responsiveness of the interface.<\/p>\n<pre class=\"prettyprint linenums lang-css\">body {\r\n\tbackground: #279dd4;\r\n\tcolor: white;\r\n\tfont-family: \"Ubuntu\", sans-serif;\r\n}\r\n\r\n.height {\r\n\tmin-height: 20vh;\r\n}\r\n\r\n.big-cup {\r\n\tbackground: white;\r\n\tcolor: rgb(24, 76, 180);\r\n\tborder: 0.3rem solid rgb(24, 76, 180);\r\n\tborder-radius: 0 0 2.5rem 2.5rem;\r\n\twidth: 15em;\r\n\tmin-height: 20em;\r\n}\r\n\r\n.litres {\r\n\tfont-size: 1.3rem;\r\n}\r\n\r\n.percentage {\r\n\tfont-size: 2.2rem;\r\n\tbackground: rgb(110, 174, 199);\r\n\tmin-width: 80%;\r\n}\r\n\r\n.cups {\r\n\tmin-height: 20em;\r\n}\r\n\r\n.small-cup {\r\n\tbackground: white;\r\n\tcolor: rgb(24, 76, 180);\r\n\tborder: 0.2rem solid rgb(24, 76, 180);\r\n\tborder-radius: 0 0 1rem 1rem;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\ttransition: all 0.3s ease;\r\n}\r\n\r\n.small-cup:hover {\r\n\tbackground: rgb(110, 174, 199);\r\n\tcolor: white;\r\n}\r\n\r\n.cup-250 {\r\n\theight: 5em;\r\n\twidth: 4em;\r\n}\r\n\r\n.cup-500 {\r\n\theight: 8em;\r\n\twidth: 5em;\r\n}\r\n\r\n.cup-750 {\r\n\theight: 11em;\r\n\twidth: 6em;\r\n}\r\n\r\n.cup-1000 {\r\n\theight: 14em;\r\n\twidth: 7em;\r\n}\r\n\r\n.reset-button {\r\n\tbackground: white;\r\n\tcolor: rgb(24, 76, 180);\r\n\tborder: 0.2rem solid rgb(24, 76, 180);\r\n\tcursor: pointer;\r\n}\r\n\r\n.reset-button:hover {\r\n\tbackground: rgb(110, 174, 199);\r\n\tcolor: white;\r\n}\r\n\r\n@media screen and (max-width: 768px) {\r\n\t.heading {\r\n\t\tmargin-top: 1em;\r\n\t}\r\n\r\n\t.reset-button {\r\n\t\tmargin-bottom: 1em;\r\n\t}\r\n}<\/pre>\n<p>4. Finally, incorporate the JavaScript code into your HTML document just before the closing <code>&lt;\/body&gt;<\/code> tag. This code adds interactive features to the Water Intake Calculator.<\/p>\n<pre class=\"prettyprint linenums lang-js\">const smallCups = document.querySelectorAll(\".small-cup\");\r\nconst litres = document.querySelector(\".litres\");\r\nconst percentage = document.querySelector(\".percentage\");\r\nconst remained = document.querySelector(\".remained\");\r\nconst todaysGoalText = document.querySelector(\"h5\");\r\nconst resetButton = document.querySelector(\".reset-button\");\r\n\r\nlet totalWater = 3;\r\nlet percentValue = 0;\r\n\r\nsmallCups.forEach((cup, index) =&gt; {\r\n\tcup.addEventListener(\"click\", () =&gt; updateBigCup(index));\r\n});\r\n\r\nresetButton.addEventListener(\"click\", () =&gt; resetLogs());\r\n\r\nfunction updateBigCup(index) {\r\n\tconst logValue = parseInt(smallCups[index].innerHTML);\r\n\r\n\ttotalWater -= logValue \/ 1000;\r\n\tlitres.innerText = totalWater + \" L\";\r\n\r\n\tpercentValue += (logValue \/ 3000) * 100;\r\n\tpercentage.innerText = percentValue.toFixed(1) + \" %\";\r\n\r\n\tif (percentValue &gt;= 99) {\r\n\t\tlitres.innerText = \"0 L\";\r\n\t\tpercentage.innerText = \"100 %\";\r\n\t\ttodaysGoalText.innerText = \"You have achieved your daily goal. Keep it up !\";\r\n\t}\r\n}\r\n\r\nfunction resetLogs() {\r\n\ttotalWater = 3;\r\n\tpercentValue = 0;\r\n\tlitres.innerText = \"3.00 L\";\r\n\tpercentage.innerText = \"0 %\";\r\n\ttodaysGoalText.innerText = `Today's goal is : 3 litres`;\r\n}<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully created a Water Intake Calculator In JavaScript. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript calculator allows you to track and manage your daily water intake. It features a user-friendly interface that helps&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9330,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-9316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vanilla-javascript"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Water Intake Calculator in JavaScript &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.\" \/>\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\/vanilla-javascript\/water-intake-calculator-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Water Intake Calculator in JavaScript &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\" \/>\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-14T18:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T11:02:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Water Intake Calculator in JavaScript\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\"},\"wordCount\":241,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\",\"name\":\"Water Intake Calculator in JavaScript &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png\",\"datePublished\":\"2024-01-14T18:01:00+00:00\",\"dateModified\":\"2024-01-22T11:02:15+00:00\",\"description\":\"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png\",\"width\":1280,\"height\":960,\"caption\":\"Water Intake Calculator in JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vanilla JavaScript\",\"item\":\"https:\/\/codehim.com\/category\/vanilla-javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Water Intake Calculator in JavaScript\"}]},{\"@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":"Water Intake Calculator in JavaScript &#8212; CodeHim","description":"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.","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\/vanilla-javascript\/water-intake-calculator-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Water Intake Calculator in JavaScript &#8212; CodeHim","og_description":"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-14T18:01:00+00:00","article_modified_time":"2024-01-22T11:02:15+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Water Intake Calculator in JavaScript","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:15+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/"},"wordCount":241,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/","url":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/","name":"Water Intake Calculator in JavaScript &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png","datePublished":"2024-01-14T18:01:00+00:00","dateModified":"2024-01-22T11:02:15+00:00","description":"Here is a free code snippet to create a Water Intake Calculator in JavaScript. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/10\/Water-Intake-Calculator-in-JavaScript.png","width":1280,"height":960,"caption":"Water Intake Calculator in JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/water-intake-calculator-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Vanilla JavaScript","item":"https:\/\/codehim.com\/category\/vanilla-javascript\/"},{"@type":"ListItem","position":3,"name":"Water Intake Calculator in JavaScript"}]},{"@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":991,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9316","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=9316"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9316\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9330"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}