Can anyone help out in this

Asked By Mano
08-Sep-10 01:02 PM
Earn up to 0 extra points for answering this tough question.
Can we multiple any chacters/ symbols  like as *,A in the java scripts ?
 for exmple
     &
    &&
   &&&

  re: Can anyone help out in this

Reena Jain replied to Mano
09-Sep-10 02:02 AM
hi,

no you can not multiply the symbol, only number can multiple you can use for loop to fulfill your requirement.


  re: Can anyone help out in this

[ Kirtan ] replied to Mano
10-Sep-10 06:59 AM
 <script>
      var x = 5;
      var i=1;
      while (i<= x) 
      {
        var k = x;
        while (k > i)
        {

          document.write("&nbsp;");
          k--;
         }
        
        var j=1;
        while (j <= i) 
        {
          document.write("& ");
          j++;
        }

         

        document.write("<br/>");
        i++;
      }
    </script>
Create New Account