Results 1 to 6 of 6

Thread: difference between local and global scope in JavaScript ?

  1. #1
    Registered
    Join Date
    Jun 2017
    Posts
    24

    difference between local and global scope in JavaScript ?

    Hello Dear,

    Please Tell Me What is difference between local and global scope in JavaScript ?

  2. #2
    Registered
    Join Date
    Aug 2017
    Location
    South Africa
    Posts
    106
    JavaScript variables have only two scopes. Global Variables − A global variable has a global scope which means it can be defined anywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.Jan 23, 2018 ( from inside a knowledge snippet inside a google search ) I copied and pasted your question and just got the answer from Google like this with your question highlighted word for word....I hope this " Seo" is benefiting your astrology website. We are a local graphic and website design company in East London - Meaning we operate local if we were global it means we orate globally despite our placement same thing as your variables there.

  3. #3

  4. #4
    Registered
    Join Date
    May 2020
    Posts
    64
    The scope of a variable is the region of your program in which it is defined. Global Variables − A global variable has a global scope which means it can be defined anywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is defined.

  5. #5
    Registered RH-Calvin's Avatar
    Join Date
    Mar 2017
    Location
    Forum
    Posts
    1,667
    The scope of a variable is the region of your program in which it is defined. Global Variables − A global variable has a global scope which means it can be defined anywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is defined.
    Cheap VPS Hosting | VPS Starting from $12 PER Year
    Cheap Dedicated Server | Unmetered Bandwidth | Free Setup and IPMI

  6. #6
    Banned
    Join Date
    Jan 2021
    Posts
    75
    JavaScript variables have only two scopes. Global Variables − A global variable has a global scope which means it can be defined anywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.

Similar Threads

  1. Scope of web designing?
    By pxljobs in forum Website Programming & Databases
    Replies: 10
    Last Post: 10-04-2017, 09:45 PM
  2. Help: Need An Example of a Project Scope
    By buckmajor in forum Business and Legal Issues
    Replies: 0
    Last Post: 04-04-2007, 10:15 PM
  3. what is the difference between local and not local server ?
    By soniaR in forum Web Hosting & Servers
    Replies: 3
    Last Post: 06-08-2006, 07:46 AM
  4. javascript help
    By VietBoyVS in forum HTML, CSS, Layout, and Design
    Replies: 0
    Last Post: 04-12-2004, 12:39 AM
  5. How come (javascripT)
    By Johan H in forum Search Engine Optimization
    Replies: 4
    Last Post: 10-01-2003, 06:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •