Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:29:34+00:00 2026-06-11T17:29:34+00:00

For instance, in Lua and Python: num = 3; On the other hand, other

  • 0

For instance, in Lua and Python:

num = 3;

On the other hand, other languages like JavaScript use ‘var’:

var num = 3;

I presume that the use of ‘var’ word should be fast to parse “var num = 3” as a variable declaration than “num = 3” (or am I wrong?).

So, why same script languages doesn’t use a “var” word to the variable declaration?
Is it irrelevant?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:29:35+00:00Added an answer on June 11, 2026 at 5:29 pm

    The are several possible reasons:

    1. The semantics might be different (e.g. in JavaScript foo = 1 and var foo = 1 do different things)
    2. It might be required for the grammar of the language (to help the parser disambiguate between multiple parse trees)
    3. It might be there because the designers of the language decided that it reads more consistently this way (IIRC I read somewhere that from the parser’s perspective C# could have dropped the var in implicitly type variables, but keeping it makes the language consistent)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For instance, customers that we're creating web sites for, request things like: all links
For instance, (/=[^>]/, '═') I'd like to keep that match, but only replace the
Currently I have something in lua that is like OOP using tables. TCharacterController =
For instance: I have a swf, lets say A, that loads another swf, B.
For instance, the app could say something like, Please wait. or I'll be right
for instance something like: <apple /> will serialize just fine to a class called
For instance, I have just found myself writing the following traits like class: template<class
For instance, I've tried things like this, which doesn't work: mydict = { 'funcList1':
For instance what should I add to this expression: xyplot(a~b, groups=abc, data=super, scales=list(x=list(log=TRUE),y=list(log=TRUE)), panel
Lua is using colon operator ( : ) as instance method calling. Can I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.