diff --git a/js/github-queries.js b/js/github-queries.js
index 132f88ffc0..69d5b31eb1 100644
--- a/js/github-queries.js
+++ b/js/github-queries.js
@@ -10,7 +10,7 @@
// Get the updated field of an entry of the feed and format it like "Jan 1, 1970"
function formatDate(updated) {
// Extract the date and create a Date object
- date = new Date(updated);
+ const date = new Date(updated);
// Names for the months (we do not need an external library just for this)
var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
@@ -27,9 +27,9 @@ var github_api_endpoint = 'https://api.github.com/repos/precice/precice/releases
fetch(github_api_endpoint).then(function(response) {
if (response.ok) {
response.json().then(function(data) {
- tag = data[0].name;
- published_at = data[0].published_at;
- url = data[0].html_url
+ const tag = data[0].name;
+ const published_at = data[0].published_at;
+ const url = data[0].html_url
// Format the text, which contains the link, the title, and the date.
var text = 'Latest ' + tag + ' (' + formatDate(published_at) + ') ';
document.getElementById('latest-release').innerHTML = text;
@@ -54,7 +54,7 @@ document.addEventListener("DOMContentLoaded", function() {
fetch(github_api_endpoint).then(function(response) {
if (response.ok) {
response.json().then(function(data) {
- count = data.stargazers_count
+ const count = data.stargazers_count
var text = 'Star on GitHub ' + count + '';
document.getElementById('github-button').innerHTML = text;
});