Javascript article,How to call function and closure function in JavaScript
نوشته شده توسط : dotnek

There are many programmers, each of whom can master different languages in order ​​to create the best possible different programs that the user can use, one of the programming languages ​​that is very popular among programmers is JavaScript programming language, which they use extensively to achieve their goals.There are various features in this language, and among all of these features, we can mention the existence of different functions as well as closure function, which we will discuss in the following.

What is a JavaScript programming language?

It is one of the most popular programming languages ​​available, through which complex features can be easily implemented and enable the user in order to provide a better user interaction.

Call function:

It is possible to use this property for different objects by writing only one method, the point that should be mentioned in this regard, is that all the functions that exist in this language are objects.Consider the following example.

<! DOCTYPE html>
<html>
<body>

<h2> JavaScript Functions </h2>

<p> This example creates an object with 3 properties (firstName, lastName, fullName). </p>
<p> The fullName property is a method: </p>

<p id = "demo"> </p>

<script>
var myObject = my
firstName: "Rose",
lastName: "kia",
fullName: function () {
return this.firstName + "" + this.lastName;
}
}
x = myObject.fullName ();
document.getElementById ("demo"). innerHTML = x;
</script>

</body>
</html>
The result of the example will be as follows.

JavaScript Functions

This example creates an object with 3 properties (firstName, lastName, fullName).

The fullName property is a method:

Rose Kia 

 

Read more on:https://www.dotnek.com/Blog/Web/how-to-call-function-and-closure-function-in

link:https://dotnek.mystrikingly.com/

Related link:DotNek Search engine Optimization (SEO services)





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 51
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: