Blog Tentang Informasi Tutorial Desain Web Dan Info Terkini

queue 1

<html>
<head><title>Program Queue dengan shift dan unshift javascript</title>

<script language = "javascript">

function DataQueue ()
{
var queue = [];
queue.unshift (1) ;
queue.unshift (2) ;

var i = queue.pop ();
document.write (i + "<br/>");
queue.unshift (3) ;
queue.unshift (4) ;
var i = queue.pop ();
document.write (i + "<br/>");
}

</script>
</head>
<body bgcolor="lavender">
<form name="FormStrukturData">
<input name="btnQueue" value="Queue" type="button"
onClick="DataQueue();"/>
</form>
</body>
</html>

outputnya :





setelah di klik outputnya :
Tag : MATA KULIAH
0 Komentar untuk "queue 1"

INFO NEWS UPDATE

loading...
Back To Top