<p>What JavaScript keywords (function names, variables, etc) are reserved?</p>

[{'answer_id': 60396, 'author': 'benc', 'author_id': 2910, 'author_profile': 'https://Stackoverflow.com/users/2910', 'pm_score': 8, 'selected': True, 'text': '<p>We should be linking to the actual sources of info, rather than just the top google hit.</p>\n\n<p><a href="http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words" rel="noreferrer">http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words</a></p>\n\n<p>JScript 8.0:\n<a href="http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx</a></p>\n'}, {'answer_id': 147776, 'author': 'Joseph Holsten', 'author_id': 16981, 'author_profile': 'https://Stackoverflow.com/users/16981', 'pm_score': 6, 'selected': False, 'text': '<p>To supplement <a href="https://stackoverflow.com/a/60396/">benc\'s answer</a>, see <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf" rel="noreferrer">Standard ECMA-262</a>. These are the official reserved words, but only a pedant ignores the implementation to respect the standard. For the reserved words of the most popular implementations, that is firefox and internet explorer, see benc\'s answer.</p>\n\n<p>The reserved words in EMCAScript-262 are the <em>Keyword</em>s, <em>Future Reserved Word</em>s, <em>NullLiteral</em>, and <em>BooleanLiteral</em>s, where the <em>Keywords</em> are</p>\n\n<pre><code>break     do        instanceof  typeof\ncase      else      new         var\ncatch     finally   return      void\ncontinue  for       switch      while\ndebugger  function  this        with\ndefault   if        throw\ndelete    in        try\n</code></pre>\n\n<p>the <em>Future Reserved Word</em>\u200bs are</p>\n\n<pre><code>abstract  export      interface  static\nboolean   extends     long       super\nbyte      final       native     synchronized\nchar      float       package    throws\nclass     goto        private    transient\nconst     implements  protected  volatile\ndouble    import      public \nenum      int         short\n</code></pre>\n\n<p>the <em>NullLiteral</em> is</p>\n\n<pre><code>null\n</code></pre>\n\n<p>and the <em>BooleanLiteral</em>s are</p>\n\n<pre><code>true\nfalse\n</code></pre>\n'}, {'answer_id': 12114140, 'author': 'art4theSould', 'author_id': 1623324, 'author_profile': 'https://Stackoverflow.com/users/1623324', 'pm_score': 11, 'selected': False, 'text': '<p>Here is my poem, which includes all of the reserved keywords in JavaScript, and is dedicated to those who remain honest in the moment, and not just try to score:</p>\n\n<pre class="lang-none prettyprint-override"><code>Let this long package float, \nGoto private class if short.\nWhile protected with debugger case,  \nContinue volatile interface.\nInstanceof super synchronized throw, \nExtends final export throws.  \n\nTry import double enum?  \n- False, boolean, abstract function, \nImplements typeof transient break!\nVoid static, default do,  \nSwitch int native new. \nElse, delete null public var \nIn return for const, true, char\n…Finally catch byte.\n</code></pre>\n'}, {'answer_id': 16651703, 'author': 'its_me', 'author_id': 1071413, 'author_profile': 'https://Stackoverflow.com/users/1071413', 'pm_score': 4, 'selected': False, 'text': '<p>I was just reading about this in <strong><a href="https://rads.stackoverflow.com/amzn/click/com/1449399029" rel="noreferrer" rel="nofollow noreferrer">JavaScript &amp; jQuery: The Missing Manual</a></strong>:</p>\n<blockquote>\n<p><em>Not all of these reserved words will cause problems in all browsers, but it’s best to steer clear of these names when naming variables.</em></p>\n<p><strong>JavaScript keywords:</strong> <code>break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, this, throw, true, try, typeof, var, void, while, with</code>.</p>\n<p><strong>Reserved for future use:</strong> <code>abstract, boolean, byte, char, class, const, double, enum, export, extends, final, float, goto, implements, import, int, interface, let, long, native, package, private, protected, public, short, static, super, synchronized, throws, transient, volatile, yield</code>.</p>\n<p><strong>Pre-defined global variables in the browser:</strong> <code>alert, blur, closed, document, focus, frames, history, innerHeight, innerWidth, length, location, navigator, open, outerHeight, outerWidth, parent, screen, screenX, screenY, statusbar, window</code>.</p>\n</blockquote>\n'}, {'answer_id': 29122006, 'author': 'GOTO 0', 'author_id': 1083663, 'author_profile': 'https://Stackoverflow.com/users/1083663', 'pm_score': 3, 'selected': False, 'text': '<p>Here is a browser and language version agnostic way to determine if a particular string is treated as a keyword by the JavaScript engine. Credits to <a href="https://stackoverflow.com/a/16157652/1083663">this answer</a> which provides the core of the solution.</p>\n\n<pre><code>function isReservedKeyword(wordToCheck) {\n    var reservedWord = false;\n    if (/^[a-z]+$/.test(wordToCheck)) {\n        try {\n            eval(\'var \' + wordToCheck + \' = 1\');\n        } catch (error) {\n            reservedWord = true;\n        }\n    }\n    return reservedWord;\n}\n</code></pre>\n'}, {'answer_id': 30130726, 'author': 'GitaarLAB', 'author_id': 588079, 'author_profile': 'https://Stackoverflow.com/users/588079', 'pm_score': 2, 'selected': False, 'text': '<p>None of the current answers warn that regardless of ES-Dialect, browsers tend to have their own lists of reserved keywords, methods etc on top of what ES dictates.</p>\n\n<p>For example, IE9 prohibits use of logical names like: <code>addFilter</code>, <code>removeFilter</code> (they, among others, are reserved methods).</p>\n\n<p>See <a href="http://www.jabcreations.com/blog/internet-explorer-9" rel="nofollow">http://www.jabcreations.com/blog/internet-explorer-9</a> for a more extensive \'currently known\' list specific to IE9. I have yet find any official reference to them on msdn (or elsewhere).</p>\n'}, {'answer_id': 36193643, 'author': 'Reikim', 'author_id': 4271595, 'author_profile': 'https://Stackoverflow.com/users/4271595', 'pm_score': 0, 'selected': False, 'text': '<p>benc\'s answer is excellent, but for my two cents, I like the w3schools\' page on this:</p>\n\n<p><a href="http://www.w3schools.com/js/js_reserved.asp" rel="nofollow">http://www.w3schools.com/js/js_reserved.asp</a></p>\n\n<p>In addition to listing the keywords reserved by the standard, it also has a long list of keywords you <em>should</em> avoid in certain contexts; for example, not using the name <code>alert</code> when writing code to be run in a browser. It helped me figure out why certain words were highlighting as keywords in my editor even though I knew they weren\'t keywords.</p>\n'}, {'answer_id': 47374050, 'author': 'starhopperx', 'author_id': 8142866, 'author_profile': 'https://Stackoverflow.com/users/8142866', 'pm_score': 2, 'selected': False, 'text': '<p>Here is a list from Eloquent JavaScript book:</p>\n\n<ul>\n<li><code>break</code></li>\n<li><code>case</code></li>\n<li><code>catch</code></li>\n<li><code>class</code></li>\n<li><code>const</code></li>\n<li><code>continue</code></li>\n<li><code>debugger</code></li>\n<li><code>default</code></li>\n<li><code>delete</code></li>\n<li><code>do</code></li>\n<li><code>else</code></li>\n<li><code>enum</code></li>\n<li><code>export</code></li>\n<li><code>extend</code></li>\n<li><code>false</code></li>\n<li><code>finally</code></li>\n<li><code>for</code></li>\n<li><code>function</code></li>\n<li><code>if</code></li>\n<li><code>implements</code></li>\n<li><code>import</code></li>\n<li><code>in</code></li>\n<li><code>instanceof</code></li>\n<li><code>interface</code></li>\n<li><code>let</code></li>\n<li><code>new</code></li>\n<li><code>null</code></li>\n<li><code>package</code></li>\n<li><code>private</code></li>\n<li><code>protected</code></li>\n<li><code>public</code></li>\n<li><code>return</code></li>\n<li><code>static</code></li>\n<li><code>super</code></li>\n<li><code>switch</code></li>\n<li><code>this</code></li>\n<li><code>throw</code></li>\n<li><code>true</code></li>\n<li><code>try</code></li>\n<li><code>typeof</code></li>\n<li><code>var</code></li>\n<li><code>void</code></li>\n<li><code>while</code></li>\n<li><code>with</code></li>\n<li><code>yield</code></li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/26255', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/399/']