IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   HTML/CSS/JavaScript (https://www.ircforumlari.net/html-css-javascript/)
-   -   Bir stringi tersten başlayarak yazmak (https://www.ircforumlari.net/html-css-javascript/625419-bir-stringi-tersten-baslayarak-yazmak.html)

hAte 10 Ekim 2014 03:56

Bir stringi tersten başlayarak yazmak
 
<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT>
// Define a function that extends the capabilities of String objects
function reverse()
{
myArray = new Array(this.length);

for(myEnum=0; myEnum<this.length; myEnum++)
{
myArray[myEnum] = this.substr(myEnum,1)
}

myArray.reverse();

return myArray.join("");
}
// Register the new function
String.prototype.reverse = reverse;
// Create a string object and test the String.reverse() method
myString = new String("ABCDEFGH");
document.write(myString.reverse())
document.write("<BR>")
</SCRIPT>
</BODY>
</HTML>


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 05:13.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk