Jump to content

hello


sonicy
 Share

Recommended Posts

[ @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());
}

---

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
 Share

×
×
  • 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.