What is function and why do we use it?
- Local and Global variables in JavaScript.

A small thread🧵👇
- A JavaScript function is a block of code designed to perform a particular task. It allows us to write more maintainable code. Define the code once, and use it many times. You don’t need to write the same code over and over again.
- It is defined with the function keyword, followed by a name and parentheses (). The code to be executed by the function is placed inside curly brackets: {}
- A JavaScript function is executed when "something" invokes it (calls it).
What are Parameters and Arguments?

Parameters: These are the list of variables used in the parentheses( ) while declaring a function.

Arguments: These are the list of values we pass into the function when we make a function call.
Local and Global variables:

Local Variable: Variables that are declared within or inside a function block are known as Local variables.
- These variables can only be accessed within the function in which they are declared.
- Scope is limited.
Global Variable: Variables that are declared outside of all the functions or blocks and can be accessed globally in a program.
- It can be accessed by any function present in the program.
- They are useful if all the functions are accessing the same data.
That's all for the thread if you find it useful retweet the first one.

Happy Learning.🌸

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with H A J R A

H A J R A Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @codewithhajra

19 Dec 21
75 Free Resources for Web Developers:

A Thread 🧵👇
Stock Photos:

1. Unsplash
2. Pixabay
3. Freepik
4. Stocksnap
5. Pexels
6. Reshot
7. Skitter photo
8. Dreams Time
9. Free Range Stock
10. Focastock
Illustration Websites:

11. storyset .com
12. illustrations .coo
13. Drawkit .io
14. Iradesign .io
15. Manypixels .co
16. illustrations .co
17. Pixeltrue .comnline
18. Pixeltrue .com
19. blush .design
20. humaaans .com
Read 10 tweets
14 Dec 21
Some useful HTML tags:

A Thread🧵👇
1- Figure: The <figure> tag specifies self-contained content, like illustrations, diagrams, photos, etc.
- The <figcaption> element is used to add a caption for the <figure> element.
2- Details: The <details> tag is often used to create an interactive widget that the user can open and close. By default, the widget is closed. When open, it expands and displays the content within.
- The <summary> tag defines a visible heading for the <details> element.
Read 8 tweets
19 Nov 21
50 Free resources for Web Developers:

A thread 🧵👇
HTML Template sites for Developers:

▶️HTML5UP
▶️Graygrids
▶️Nicepage
▶️Free-CSS
▶️Mobirise
▶️Templatemo
Top FREE stock photo websites:

▶️Unsplash
▶️Pixels
▶️Pixabay
▶️Freepik
▶️Stocksnap
▶️Burst
▶️iStock
▶️Getty Images
▶️Canva
▶️Flickr
Read 10 tweets
8 Nov 21
HTML can do that?

A thread 🧵👇
- Send Mail: While using <a> tag as an email tag, you will use mailto: email address along with href attribute.
- Dropdown Input: The <select> element is used to create a drop-down list. It is most often used in a form, to collect user input.
- The <option> tags inside the <select> element define the available options in the drop-down list.
Read 11 tweets
2 Nov 21
5 HTML Tricks nobody tells you:

A Thread🧵👇
1- Spellcheck: The spellcheck is used to check the spelling and grammar of Html elements such as input.
2- Translate: The translate attribute is used to tell the browser whether the content is to be translated or not.
It can be translated into any language.
Read 7 tweets
1 Nov 21
Day 36 in #100DaysOfCode

Learned about JavaScript Operators:
- Assignment Operators
- Arithmetic Operators
- Comparison Operator
- Logical Operators
- Type Operator

A small thread 🧵👇
In JavaScript, an operator is a special symbol used to perform operations on operands (values and variables).

like let x = 3 + 5;

Here + is an operator that performs addition, and 3 and 5 are operands.
>> Assignment Operator: The assignment operator (=) assigns a value to a variable.

const x = 5;
Here, 5 is assign to a variable x.
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(