Jump to content

Help me please..


tayfunatasayar

Recommended Posts

1) We're not here to do your homework. Please give it an attempt, and then tell us what you have so far. We'll help you from there.2) I can't understand anything you just wrote. Could you explain a bit more?

Link to comment
Share on other sites

how can i reserve string values?For example;TAYFUN NUFYATTAYFU----UFYATTAYF-------FYATTAY-.-.-.-.-.YATTA-.-.-.-.-.-.-ATT-.-.-.-.-.-..--.Ttayfun is a value what entered with prompt.. like that;

function Text(){ name=prompt("Name","");window.document.write( ad +"" +"<br>");for(var i=name.length ; i>=0 ; i--){ window.document.write( name.substring(i-1,0) + "<br>"); } }Result...............
Link to comment
Share on other sites

I have no idea what the lines are in the middle, but if you're just looking to take a string, and write it and its reverse on a line, then remove a character from it, and repeat writing it and its reverse until you have one character, then...

<script type='text/javascript'>/*Normal & Reverse PrintCreated by Webworldxhttp://w3schools.com*/var myString = "Hello"function reverse_print_remove(txt){  if(txt.length == 0) return false;  document.write( txt + " " );  document.write( txt.split("").reverse().join("") );  document.write( "<br />" );    txt = txt.substring(0,txt.length-1);  reverse_print_remove(txt);}reverse_print_remove(myString);</script>

Note you'll have to know how that works, and if it's part of your homework, you'll want to rewrite it for yourself or attribute it appropriately.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...