JavaScript/Basics: Difference between revisions

wikademia>Aditya2k
m →Operators: - Corrected spelling of Arithmetic
wikademia>Henri de Solages
Client-oriented. Conditional operator.
Line 4: Line 4:


Basics -  
Basics -  
*JavaScript is the most popular web page scripting language and is suppported by almost every browser.
*JavaScript is the most popular web page scripting language and is supported by almost every browser.
*It adds interactivity to your web pages.
*It adds interactivity to your web pages.  
*You can use only the tools already on your computer without the need to download any software.
*You can use only the tools already on your computer without the need to download any software.
*It is easy and fun
*JavaScript uses the user's computer ("client")'s resources, not the server's resources. (The server is the big remote computer the web site is permanently hosted.) In other words, if the JavaScript program says a computation is to be made, the user's computer will do it.
*It is easy.


== First Lesson ==
== First Lesson ==
Line 271: Line 272:


<pre> greeting = ( visitor == "PRES" ) ? "Dear President " : "Dear " </pre>
<pre> greeting = ( visitor == "PRES" ) ? "Dear President " : "Dear " </pre>
''value1'' is the value of the expression if "''condition''" is fulfilled. ''value2'' is its value in the case "''condition''" is not fulfilled. In the previous example, this value is stored in the variable "''greeting''".


[[Category:JavaScript]]
[[Category:JavaScript]]
[[Category:Basics]]
[[Category:Basics]]