<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
var insan=new Array("mehmet","fatih","yavuz","kanuni");
document.write(insan[0]);
</script>
</body>
</html>
---------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
var insan=new Array();
insan[0]="Ahmet";
insan[2]="Fatih"
document.write(insan[2]);
</script>
</body>
</html>
----------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var ogretmenler=new Array("mehmet","fatih","yavuz","kanuni");
var polis=new Array("Adnan","osman","murat");
var insan=ogretmenler.concat(polis);
document.write(insan[5]);
</script>
</body>
</html>
----------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
var stringecevir=arabalar.join();
document.write(stringecevir);
</script>
</body>
</html>
----------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
var stringecevir=arabalar.join(" - ");
document.write(stringecevir);
</script>
</body>
</html>
----------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
var stringecevir=arabalar.join(" - ");//elemanın arasına ekler
document.write(stringecevir+"<br/>");
arabalar.pop();//son elemanı siler
document.write(arabalar[3]);
arabalar.pop();
document.write(arabalar[2]);
</script>
</body>
</html>
--------------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
arabalar.reverse();//ters çevirir
var stringecevir=arabalar.join(" - ");//elemanın arasına ekler
document.write(stringecevir+"<br/>");
</script>
</body>
</html>
--------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
arabalar.reverse();//ters çevirir
arabalar.push("kartal","şahin");//ekleme yapar.
var stringecevir=arabalar.join(" - ");//elemanın arasına ekler
document.write(stringecevir+"<br/>");
</script>
</body>
</html>
------------------------
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body >
<script type="text/javascript">
//array özellikleri
var arabalar=new Array("Toyota","opel","bmw","subaru");
arabalar.reverse();//ters çevirir
arabalar.push("kartal","şahin");//ekleme yapar.
arabalar.sort();//sıralama yapar alfabetik.
var stringecevir=arabalar.join(" - ");//elemanın arasına ekler
document.write(stringecevir+"<br/>");
</script>
</body>
</html>
Hiç yorum yok:
Yorum Gönder