Some list of JavaScript reserved words

Posted by tagicon_admin | August 28, 2015 | in : JavaScript

Try to avoid some List of JavaScript reserved words when coding. When we code / write a program in JavaScript or any other language sometime we need to declare variable or create functions with a user define name. In this case, if we use or declare a variable or create a function with name that contain JavaScript reserved word then JavaScript might execute the statement or function for the reserved word and not our assign variable or function. Reserved word are those in JavaScript that have been reserved for statements and built-in JavaScript functions. For example: if we use the reserved word as a variable name, it attempt to jump out of a loop.

 

Below list I give some JavaScript reserved words list of content.

  • abstract
  • arguments
  • boolean
  • break
  • byte
  • case
  • catch
  • char
  • class
  • const
  • continue
  • debugger
  • default
  • delete
  • do
  • double
  • else
  • enum
  • eval
  • export
  • extends
  • false
  • final
  • finally
  • float
  • for
  • function
  • goto
  • if
  • implements
  • import
  • in
  • instanceof
  • int
  • interface
  • let
  • long
  • native
  • new
  • null
  • package
  • private
  • protected
  • public
  • return
  • short
  • static
  • super
  • switch
  • synchronized
  • this
  • throw
  • throws
  • transient
  • true
  • try
  • typeof
  • var
  • void
  • volatile
  • while
  • with
  • yield

Without all the above list, we should try to avoid some words that we use in our statement. Like : in a HTML page we create a form with an attribute “name”, “action” , ” method” try to avoid this type of word as a variable or function name.

 

Without above those reserved words there are some other word that we should also avoid.

Below list I give this word that we should avoid

  • alert
  • all
  • anchor
  • anchors
  • area
  • Array
  • assign
  • blur
  • button
  • checkbox
  • clearInterval
  • clearTimeout
  • clientInformation
  • close
  • closed
  • confirm
  • constructor
  • crypto
  • Date
  • decodeURI
  • decodeURIComponent
  • defaultStatus
  • document
  • element
  • elements
  • embed
  • embeds
  • encodeURI
  • encodeURIComponent
  • escape
  • eval
  • event
  • fileUpload
  • focus
  • form
  • forms
  • frame
  • frameRate
  • frames
  • function
  • getClass
  • hasOwnProperty
  • hidden
  • history
  • image
  • images
  • Infinity
  • innerHeight
  • innerWidth
  • isFinite
  • isNaN
  • isPrototypeOf
  • java
  • JavaArray
  • javaClass
  • JavaObject
  • JavaPackage
  • layer
  • layers
  • length
  • link
  • location
  • Math
  • mimeTypes
  • name
  • NaN
  • navigate
  • navigator
  • Number
  • Object
  • offscreenBuffering
  • onblur
  • onclick
  • onerror
  • onfocus
  • onkeydown
  • onkeypress
  • onkeyup
  • onload
  • onmousedown
  • onmouseover
  • onmouseup
  • onsubmit
  • open
  • opener
  • option
  • outerHeight
  • outerWidth
  • packages
  • pageXOffset
  • pageYOffset
  • parent
  • parseFloat
  • parseInt
  • password
  • pkcs11
  • plugin
  • prompt
  • propertyIsEnum
  • prototype
  • radio
  • reset
  • screenX
  • screenY
  • scroll
  • secure
  • select
  • self
  • setInterval
  • setTimeout
  • status
  • String
  • submit
  • taint
  • text
  • textarea
  • top
  • toString
  • undefined
  • unescape
  • untaint
  • valueOf
  • window

Related Posts

Leave a Reply