Maximum length of variable name in JavaScript

后端 未结 2 693
名媛妹妹
名媛妹妹 2020-12-10 00:14

What is the maximum length of a variable name in JavaScript?

2条回答
  •  眼角桃花
    2020-12-10 01:06

    Just as I have tested earlier on:

    
    
    
    
    
    
    
    
    
    

    This script works as per fine. The variable name is longer than 512 characters.

    My guess is that since Javascript is a interpreted language (or aka scripting language), the variable name length does not matter as long as it refers to a defined variable.

提交回复
热议问题