Jump to content

hello


sonicy

Recommended Posts

Posted

[ @sonicy ]
---

function writeHelloWorld (outputMethod) {
   var h = 'h';
   var e = 'e';  
   var l = "l";
   var d = "d";
   var o = 'o', w = 'w', r = 'r';
   var space = " ";
   var no_space = '';
   var myArr = [h,e,l,l,o,space,w,o,r,l,d];
   var string = myArr.join(no_space);
   var stringArray = string.split(space);
   outputMethod(stringArray.shift());
   outputMethod(space);
   outputMethod(stringArray.shift());
}

---

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.