Use const wherever possible in js/
[plack-app-gruntmaster.git] / js / 90-divine-format.js
index ab5a5f29fae79797592f7aae43fcef65d9e96e95..da4885695889324bcd9a0712920901b7b5385cee 100644 (file)
@@ -1,4 +1,4 @@
-var ext_table = {
+const ext_table = {
        'c'   : 'C',
 
        'cc'  : 'CPP',
@@ -30,8 +30,8 @@ var ext_table = {
 }
 
 function divine_format() {
-       var filename = $('#prog')[0].value;
-       var ext = /\.([^.]*)$/.exec(filename)[1];
+       const filename = $('#prog')[0].value;
+       const ext = /\.([^.]*)$/.exec(filename)[1];
 
        if(ext_table[ext])
                $('#prog_format')[0].value = ext_table[ext];
This page took 0.009787 seconds and 4 git commands to generate.