W3Schools

 

home ANA SAYFA

JS Temel
JS ANA SAYFA
JS Giriş
JS Nasıl
JS Nereye
JS Değişkenler
JS Operatörler
JS Fonksiyonlar
JS Koşul Deyimleri
JS Döngüler
JS Esas Noktalar

JS Referencelar
JS Dizi
JS Boolean
JS Tarih
JS Matematik
JS String
JS HTML DOM

Örnekler/Quizler
JS Temel Örnekler
JS Öz Örnekler
JS DOM Örnekler
JS Quiz

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

JavaScript Operatörler

previous next

Operatörler değişkenler üzerinde çalışmak için kullanılırlar.


Aritmatik Operatörler

Operatör Tanım Örnek sonuç
+ Toplama x=2
x+2
4
- Çıkarma x=2
5-x
3
* Çarpma x=4
x*5
20
/ Bölme 15/5
5/2
3
2.5
% Modul (bölümden kalan) 5%2
10%8
10%2
1
2
0
++ Artma x=5
x++
x=6
-- Azaltma x=5
x--
x=4

Atama Operatörleri

Operatör Örnek Benzeri
= x=y x=y
+= x+=y x=x+y
-= x-=y x=x-y
*= x*=y x=x*y
/= x/=y x=x/y
%= x%=y x=x%y

Karşılaştırma Operatörleri

Operatör Tanım Örnek
== eşittir 5==8 false döner
!= eşit değildir 5!=8 true döner
> büyüktür 5>8 false döner
< küçüktür 5<8 true döner
>= büyük eşittir 5>=8 false döner
<= küçük eşittir 5<=8 true döner

Mantıksal operatörler

Operatör Tanım Örnek
&& ve x=6
y=3

(x < 10 && y > 1) true döner

|| veya x=6
y=3

(x==5 || y==5) false döner

! değil x=6
y=3

!(x==y) true döner

String Operatörü

Bir string çogunlukla metindir.Örneğin "Merhaba dünya!". İki veya daha fazla string değişkeni birleştirilirken + operatörü kullanılır.

txt1="Ne güzel"
txt2="bir gün!"
txt3=txt1+txt2 

Şimdi txt3 değişkeni "Ne güzelbir gün!" ifadesini içeriyor.

İki string arasına boşluk eklemek için; boşluk karakterini ifadenin ortasına VEYA birinci stringe ekleyiniz.

txt1="Ne güzel"
txt2="bir gün!"
txt3=txt1+" "+txt2
or
txt1="Ne güzel "
txt2="bir gün!"
txt3=txt1+txt2

Şimdi txt3 değişkeni "Ne güzel bir gün!" ifadesini içeriyor.


previous next

Product Spotlight


Want To Be A Web Master?

If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).

Maximum ASP is a service provider with a unique web hosting platform designed specifically for serious Microsoft developers. They offer high performance and stability at a good price with a 30-day, money-back guarantee.

They have access to all of Microsoft's web technologies, and their support staff are 100% Microsoft-certified.

Visit MaximumASP


We Help You For Free. You Can Help Us!


Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


What Others Say About Us

Does the world know about us? Check out these places:

Google  Yahoo  Alta Vista  MSN  Lycos  Excite  Ask Jeeves  HotBot


W3Schools is for training only. We do not warrant the correctness of the content. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2005 by Refsnes Data. All Rights Reserved.


Validate Validate Validate W3Schools was converted to XHTML in December 1999
SITE SEARCH
 
About W3Schools
ASP.NET Web Hosting
ASP.NET
Web Hosting
WEB HOSTING
$15 Domain Name
Registration
Save $20 / year!
UK Domain Names
Web Hosting

Registro de Dominios
Buy UK Domain Names
Register Domain Names
Cheap Domain Names UK
Web Hosting UK
Domain Names UK
Domain Names UK
Quality Web Hosting
Webmail & POP3 Email
Web Hosting UK
Dedicated Servers UK

Web Design UK
Ecommerce Solutions
Register a Domain
Offshore Outsourcing
WEB BUILDING
Website Templates
Website Builder
Flash Templates
Web Templates
Custom Programming
BEST Flash Templates
Website Log Analyzer
XML TOOLS
Stylus Studio
SHOPPING
Home Finance
Shopping UK
UK Wholesalers
UK Wholesale
Sunglasses
Yes Car Credit
Car Finance & Loans
Secured Loans UK
Secured Loans
UK Shops