Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,257 members, 7,818,877 topics. Date: Monday, 06 May 2024 at 07:09 AM

Javascript Study Group - Programming (6) - Nairaland

Nairaland Forum / Science/Technology / Programming / Javascript Study Group (13276 Views)

Lets Learn C# Here!(study Group For Beginners) / Study Group For C++ Learner (2) (3) (4)

(1) (2) (3) (4) (5) (6) (Reply) (Go Down)

Re: Javascript Study Group by blueyedgeek(m): 9:35pm On Mar 01, 2015
Here's the reverseArr function.


function reverseArr(arr) {
var newArr = [], tempArr = [], len = arr.length;

for (var i = 0; i < len; i += 1) {
tempArr[i] = arr[i];
}

for (var j = 0; j < len; j += 1) {
newArr.push(tempArr.pop());
}
return newArr;
}


Will not modify the original array but return the reversed form.

Lemme start on the other one.
Re: Javascript Study Group by Nmeri17: 11:39pm On Mar 02, 2015
blueyedgeek:
Here's the reverseArr function.


function reverseArr(arr) {
var newArr = [], tempArr = [], len = arr.length;

for (var i = 0; i < len; i += 1) {
tempArr[i] = arr[i];
}

for (var j = 0; j < len; j += 1) {
newArr.push(tempArr.pop());
}
return newArr;
}


Will not modify the original array but return the reversed form.

Lemme start on the other one.
I'm just seeing this. it didn't work o. I'd have been surprised if it did coz its unusually long.

this is a weird question but did it work on yo system?? just wanno kno if mine is anti JavaScript
Re: Javascript Study Group by blueyedgeek(m): 6:08am On Mar 03, 2015
Nmeri17:
I'm just seeing this. it didn't work o. I'd have been surprised if it did coz its unusually long.

this is a weird question but did it work on yo system?? just wanno kno if mine is anti JavaScript
Yep, it did. Was it throwing errors on yours or it wasn't doing what it was supposed to do.
Re: Javascript Study Group by Nmeri17: 7:17am On Mar 03, 2015
blueyedgeek:
Yep, it did. Was it throwing errors on yours or it wasn't doing what it was supposed to do.
errors. specifically complaining about that last return statement
Re: Javascript Study Group by blueyedgeek(m): 7:22am On Mar 03, 2015
Nmeri17:
errors. specifically complaining about that last return statement
Could you copy and paste the error as is here for me to see?
Re: Javascript Study Group by Nmeri17: 7:27am On Mar 03, 2015
blueyedgeek:
Could you copy and paste the error as is here for me to see?
uncaught
ReferenceError: newArr is not
defined
Re: Javascript Study Group by blueyedgeek(m): 7:46am On Mar 03, 2015
Nmeri17:
uncaught
ReferenceError: newArr is not
defined
That's odd, newArr is defined and instantiated to contain an empty array at first and then a deep copy of the array passed in as an argument. lemme see if I can embed a codepen here or maybe even a link to jsfiddle with the working code.

1 Like

Re: Javascript Study Group by zonax(m): 8:52pm On Mar 17, 2015
davidsmith8900:
Not 2 spam or repeat myself in this post ~> https://www.nairaland.com/1793070/programming-challenge-beginners-n20000/4#24706681 .Im totally down with this, I just think that at the end of the day the main point of these challenges, competitions and study groups is to learn and practice right? So why not learn by making a real app that can help our society and give us money. Like experience is the best teacher. What if we did these challenges, competitions and study groups in order to make a real app like:

a. An app that can predict when NEPA will turn the light off or bring it on
b. An app that can predict what Naija streets will have the most traffic, the best route to take and where to go from there
c. An app that can predict where next crime or violence or Boko Haram attacks will be.

Or how do u feel?

Like lets team up to build apps that not only will add value to our society, but will also give us money and recognition.

We could also make a Facebook or Twitter or Google clone and then try to sell it. Pata pata, people will say they are not interested, but either way, we would have learn something. Or how does everyone feel?
Nice idea kindly drop your mail ID or phone number
Re: Javascript Study Group by Olumyco(m): 5:36pm On May 12, 2015
Weldone guys
Re: Javascript Study Group by Olumyco(m): 5:36pm On May 12, 2015
Going thru dis thread I want to say u guys are doing wonderfully. I am hapi because I too code in JavaScript. Infact I decided to stick to JavaScript for development of all my apps: web apps, mobile apps and desktop apps becos I fell in love wit d language. I believe wit dis dynamic trend we can popularize d lang even beyond web development.

(1) (2) (3) (4) (5) (6) (Reply)

What Is The Average Salary Of A Php Programmer In Lagos / Where Is That Female Geek: Any Good Female Developer Around? / Keywords / Reserved word In Q-BASIC

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.