W3cubDocs

/Support Tables

const

Declares a constant with block level scope

Spec https://www.ecma-international.org/ecma-262/6.0/#sec-let-and-const-declarations
Status Other
IE Edge Firefox Chrome Safari Opera
      73    
    65 72    
    64 71 TP  
11 18 63 70 12 56
10 17 62 69 11.1 55
9 16 61 68 11 54
8 15 60 67 10.1 53
Show all
7 14 59 66 10 52
6 13 58 65 9.1 (2,3) 51
5.5 12 57 64 9 (2,3) 50
    56 63 8 (2,3) 49
    55 62 7.1 (2,3) 48
    54 61 7 (2,3) 47
    53 60 6.1 (2,3) 46
    52 59 6 (2,3) 45
    51 58 5.1 (2,3) 44
    50 57 5 (2) 43
    49 56 4 (2) 42
    48 55 3.2 (2) 41
    47 54 3.1 (2) 40
    46 53   39
    45 52   38
    44 51   37
    43 50   36
    42 49   35 (4)
    41 48 (4)   34 (4)
    40 47 (4)   33 (4)
    39 46 (4)   32 (4)
    38 45 (4)   31 (4)
    37 44 (4)   30 (4)
    36 43 (4)   29 (4)
    35 (2) 42 (4)   28 (4)
    34 (2) 41 (4)   27 (2,3)
    33 (2) 40 (2,3)   26 (2,3)
    32 (2) 39 (2,3)   25 (2,3)
    31 (2) 38 (2,3)   24 (2,3)
    30 (2) 37 (2,3)   23 (2,3)
    29 (2) 36 (2,3)   22 (2,3)
    28 (2) 35 (2,3)   21 (2,3)
    27 (2) 34 (2,3)   20 (2,3)
    26 (2) 33 (2,3)   19 (2,3)
    25 (2) 32 (2,3)   18 (2,3)
    24 (2) 31 (2,3)   17 (2,3)
    23 (2) 30 (2,3)   16 (2,3)
    22 (2) 29 (2,3)   15 (2,3)
    21 (2) 28 (2,3)   12.1 (1,3)
    20 (2) 27 (2,3)   12 (1,3)
    19 (2) 26 (2,3)   11.6 (1,3)
    18 (2) 25 (2,3)   11.5 (1)
    17 (2) 24 (2,3)   11.1 (1)
    16 (2) 23 (2,3)   11 (1)
    15 (2) 22 (2,3)   10.6 (1)
    14 (2) 21 (2,3)   10.5 (1)
    13 (2) 20 (2)   10.0-10.1 (1)
    12 (1) 19 (2)   9.5-9.6
    11 (1) 18 (2)   9
    10 (1) 17 (2)    
    9 (1) 16 (2)    
    8 (1) 15 (2)    
    7 (1) 14 (2)    
    6 (1) 13 (2)    
    5 (1) 12 (2)    
    4 (1) 11 (2)    
    3.6 (1) 10 (2)    
    3.5 (1) 9 (2)    
    3 (1) 8 (2)    
    2 (1) 7 (2)    
      6 (2)    
      5 (2)    
      4 (2)    
iOS Safari Opera Mini Android Browser Blackberry Browser Opera Mobile Android Chrome Android Firefox IE Mobile Android UC Browser Samsung Internet QQ Browser Baidu Browser
12 all (1,3) 67 10 (2,3) 46 70 63 11 11.8 7.2 1.2 (2,3) 7.12 (4)
11.3-11.4   4.4.3-4.4.4 (2,3) 7 (2,3) 12.1 (1,3)     10   6.2    
11.0-11.2   4.4 (2,3)   12 (1,3)         5    
10.3   4.2-4.3 (2,3)   11.5 (1)         4 (4)    
Show all
10.0-10.2   4.1 (2,3)   11.1 (1)              
9.3 (2,3)   4 (2,3)   11 (1)              
9.0-9.2 (2,3)   3 (2,3)   10 (1)              
8.1-8.4 (2,3)   2.3 (2)                  
8 (2,3)   2.2                  
7.0-7.1 (2,3)   2.1                  
6.0-6.1 (2,3)                      
5.0-5.1 (2,3)                      
4.2-4.3 (2)                      
4.0-4.1 (2)                      
3.2 (2)                      

Notes

  1. const is recognized, but treated like var (no block scope, can be overwritten)

  2. const does not have block scope

  3. Only recognized when NOT in strict mode

  4. Supported correctly in strict mode, otherwise supported without block scope

Resources

Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
http://caniuse.com/#feat=const