abc

Share This blog with your friends, so that we can improve more & more . our aim is to easy & simple way of learning.

4/22/2018

JavaScript function define & ways use of it.

Today we are going to start new session,
Html & JavaScript function.
In this session following points are explain.
1.what is function.
2. How to called function within function.
3. How define global variable & use in function .
4. Use function within jQuery.
5. Calling ways of functions.

An function is set of code that use to solve specific problems, it defines all detail of point.

Ex. Today I am going to school.
Answer:
Function school ()
{
Var auto= "charges of auto";
Var ready = "dress wearing & all prepared";
If (auto=='not ')
{
Alert ("you should try again");
}
Else
{
Alert ("go fast auto ready");
}
}
In above function if you see details of function variable passes auto position.
After checking an condition system display message whether you are go to school or not.

Suppose another example
Function abc()
{
If(var a== 'hello')
{
alert ("good morning");
}
Else
{
Function status ()
{
Var after = ' afternoon ';
}
}

abc();
Above function execute & if you alert variable after it displays message
About status is afternoon.

If you define variable before start function.
It says to be global or use global variables name.

If you are using jQuery simply called function.
$(document).ready(function()
{
Abc();
});
In this way function use within jQuery.
There are different ways to call function,
Onclick like html event.

Specific of function:
1.easy of use
2. One function call number of times
3. Is form short code
4. Reduce web loading time.

View more details on next session
Don't forget share.

An Introduction to the Laravel Framework: What It Is and Why You Should Use It

  If you're a PHP developer looking for a modern, efficient, and powerful framework to build web applications, look no further than Lara...