A0:  Article,Learning if ... else and switch statement commands in JavaScript
نوشته شده توسط : dotnek

JavaScript is very popular among programmers, and they get a lot of help from this language in order to create different programs, the reason for its great popularity is that there are various features in this language that can be used to achieve the main goal, so that it causes the user to have a better user experience while using the program or site which is created by using this language, as we have mentioned above, in this program, there are various possibilities that can be used by users in order to help them achieve the desired results in various fields, as a result, it is necessary to review the points related to each one, so that you can get help from each of them in the right place and time.In the following, we are going to review two of the features that exist which you can use in order to improve the quality of the content, but before that, we need to give a brief explanation about JavaScript.

What is a JavaScript programming language?

It is one of the programming languages ​​through which the content of a web can be converted from static to dynamic, which enables the user to interact more with the web and programs which are created with the help of this language.

If ... else in JS:

The if / else statement causes a block of code to be executed if a predetermined condition is specified, and if another condition is not met, another set of code can be executed.

In this language, we have the following conditional statements:

- Use if:

You can use it when the condition which you set is correct and after checking that condition the code can be executed.

- Use else:

You can use else to specify a block of code to be executed, in a case that the same condition is incorrect.

- Use else if:

It is necessary to use it when the first condition you have set is incorrect, and it is necessary to execute the block of code after checking the second condition. 

Read more on:https://www.dotnek.com/Blog/Web/learning-if-else-and-switch-statement-command

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

Related link:dotnek tech blog





:: بازدید از این مطلب : 61
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


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

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

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








cache01last1628618496