These are chat archives for FreeCodeCamp/HelpJavaScript

6th
Dec 2018
Karma Drukpa
@coderkarma
Dec 06 2018 00:01
@Pagnito I will get his React course once I am done with the one I have.
Pagnito
@Pagnito
Dec 06 2018 00:02
@coderkarma i feel u bro, i got so many course on udemy too now lol
Karma Drukpa
@coderkarma
Dec 06 2018 00:03
I don't how to speed up my way of learning...
Brad
@bradtaniguchi
Dec 06 2018 00:23
@coderkarma Build something super complicated using what you want to learn. You either learn it and finish the project, or don't and don't finish the project.
IMO Best way to learn something fast cuse otherwise you don't progress haha
Jason Luboff
@JLuboff
Dec 06 2018 00:24
Thats basically how I'm learning React
Brad
@bradtaniguchi
Dec 06 2018 00:29
I'm trying to learn ngrx that way too in my personal project.. only issue is I added after I added a buncha stuff and no things aren't making sense and breaking haha
Jason Luboff
@JLuboff
Dec 06 2018 00:29
That'll happen
Man... for some reason Print Preview is cutting off my borders on the sides... :angry:
Pagnito
@Pagnito
Dec 06 2018 01:33
Ia deployin via ftp still a thing?
Christopher McCormack
@cmccormack
Dec 06 2018 01:36
@Pagnito SCP or SFTP sure
Jason Luboff
@JLuboff
Dec 06 2018 02:57
Oh man...that brings back memory’s...
Pagnito
@Pagnito
Dec 06 2018 03:05

ok so im using express on firebase functions cloud, but since i have SPA my firebase.json has this

"rewrites": [
      {
        "source": "/api/**",
        "function": "app"
      },
      {
        "source": "**",
        "destination": "/index.html"
      }    
    ]

i wondering if the "**" will overwrite the api routes and keep sending html, as it seems to be happening

Pagnito
@Pagnito
Dec 06 2018 03:39
figured it out, not sure its the best way, so maybe someone can tell me if there is a way i can use firebase.json to do it, but this is how i did it

all rewrites to

"rewrites": [
      {
        "source": "**",
        "function": "app"
      }
    ]
  },

and since build is outside of functions dir where the server code it, i
wrote

let pathTo = path.resolve(__dirname).replace('functions','build');
i dunno if its gonna take some time tho or what, but its working perfect in firebase serve, but the deployed version isnt doing it O.o
Pagnito
@Pagnito
Dec 06 2018 04:50
one thing i dont get about firebase auth, is how am i supposed to save users
Brad
@bradtaniguchi
Dec 06 2018 05:08
@Pagnito Yousave their information to your database seperatly.
Mohammed Boudad
@matrixersp
Dec 06 2018 06:31
Hello everyone,
I'm trying to configure ESlint with Prettier globally, I created a .eslintrc in my home directory, but it's not working
Pagnito
@Pagnito
Dec 06 2018 08:02
@bradtaniguchi i read some guy said the whole point of their auth service is not to save users. Seems kind of weird tho
Simon Cordova
@gbsimon87
Dec 06 2018 09:47
@JLuboff @cmccormack whats happening! I'm just saying hello as it's very difficult to catch you guys these days with the time diff
I'll see if I can log in later on today
Spyrantis Theodoros
@thodorisanta
Dec 06 2018 14:19
My understanding so far is that Number can do the same thing parseFloat AND parseInt can do. So why would i ever need to use parseFloat orparseInt when i can just use Number ?
i mean that (with Number) i can pass either a float or an integer and it will be converted into a number. while with the other two i have to know if the numbers in the string are floats or integers. So why shouldnt i use Number all the time?
i hope that you can make sense from my explanation xD
Aditya
@ezioda004
Dec 06 2018 14:33
@thodorisanta parseInt() can do more than type casting. You can change the bases of the string with it, like:
parseInt("01001", 2); // 9, binary to decimal
parseInt("0xac", 16); // 172 hexadecimal to decimal
parseInt("023", 8); // 19 octal to decimal
Spyrantis Theodoros
@thodorisanta
Dec 06 2018 14:51
@ezioda004 okay so parseInt can do more than just convert a string to a number. Thanks
function alphabeticalOrder(arr) {
  // Add your code below this line
   return arr.sort(function(a,b) {
    return a > b;
  });

  // Add your code above this line
}
alphabeticalOrder(["a", "d", "c", "a", "z", "g"]);

console.log(alphabeticalOrder(["a", "d", "c", "a", "z", "g"]));
i gave this answer and its not working. but why?
Aditya
@ezioda004
Dec 06 2018 14:55
@thodorisanta Yeah that doesnt work anymore, try return a - b; instead
Chrome updated how .sort() works
yayne
@yayne
Dec 06 2018 15:19
someone can help me how to call it a function on another function in Javascript?
Norvin Burrus
@ndburrus
Dec 06 2018 15:19
@matrixersp this may be helpful :sparkles:
Aditya
@ezioda004
Dec 06 2018 15:22
@yayne You mean a higher order function?
function higherOrder(callback){
  console.log("Hello from higherOrder function");
  callback();
}
higherOrder(function(){
  console.log("Hello from callback function");
});
yayne
@yayne
Dec 06 2018 15:30
@ezioda004
I have a progress bar function in my file and I am using a web component and i have alot of functions. As normal when i call the progress function it doesn't work and also when i call it the exact place, it doesn't.
Spyrantis Theodoros
@thodorisanta
Dec 06 2018 15:31
@ezioda004 like this?
function alphabeticalOrder(arr) {
  // Add your code below this line
   return arr.sort(function(a,b) {
    return a - b;
  });

  // Add your code above this line
}
it doesnt work either
Aditya
@ezioda004
Dec 06 2018 15:33
@thodorisanta Try return a.charCodeAt(0) - b.charCodeAt(0);
Spyrantis Theodoros
@thodorisanta
Dec 06 2018 15:34
@ezioda004 wow. why they changed that. it was so simple before xD
Aditya
@ezioda004
Dec 06 2018 15:35
@thodorisanta You can do this too:
 return arr.sort((a, b) => a > b ? 1 : -1);
Previously the behavior was actually bad, all other browsers had correct behavior of comparison function except Chrome.
So they "fixed" it.
Jason Luboff
@JLuboff
Dec 06 2018 16:12
@gbsimon87 Hey man, hope you're doing well :thumbsup:
@ezioda004 How
's it going?
Aditya
@ezioda004
Dec 06 2018 16:17
@JLuboff Hey, just listening to music - waiting for exams to be over. What about you?
Jason Luboff
@JLuboff
Dec 06 2018 16:18
Just got into work.. going to be working with SSRS...React...SQL.. all the fun stuff :smile:
Did you end up accepting that job?
Aditya
@ezioda004
Dec 06 2018 16:21

Oh fun stuff indeed, I find working on React quite satisfying

Did you end up accepting that job?

Yeah, joining on 17th

Jason Luboff
@JLuboff
Dec 06 2018 16:21
Ya getting close to done with the first part of my React project... or at least.. done in the sense that it'll be working. A lot of refactoring will still need to occur.
And thats awesome! Less than two weeks away
Aditya
@ezioda004
Dec 06 2018 16:24
Yeah, quite excited but have to find apartment and stuff, that should be hectic
Jason Luboff
@JLuboff
Dec 06 2018 16:24
I imagine so. Are they providing any temporary housing or anything?
Christopher McCormack
@cmccormack
Dec 06 2018 16:29
:wave:
@JLuboff SSRS?
Jason Luboff
@JLuboff
Dec 06 2018 16:29
Morning friend
SSRS = SQL Server Reporting Services
Essentially a front end for queries
Christopher McCormack
@cmccormack
Dec 06 2018 16:30
@JLuboff you seem excited for this! I'm excited for you now
@ezioda004 are you a bachelor?
Jason Luboff
@JLuboff
Dec 06 2018 16:32
@cmccormack Mmm... I'm excited becuase I got my query working...SSRS...is something I'm still very inexperienced with so trying to get my report to look how I want is where my challenge lies
Aditya
@ezioda004
Dec 06 2018 16:36
@cmccormack Yes
Christopher McCormack
@cmccormack
Dec 06 2018 16:36
@ezioda004 oh man that's exciting
Jason Luboff
@JLuboff
Dec 06 2018 16:41
@cmccormack What are you working on today?
Aditya
@ezioda004
Dec 06 2018 16:41
@cmccormack Why?
Christopher McCormack
@cmccormack
Dec 06 2018 16:41
more cert stuff
@ezioda004 I dunno I always find moving to a new place and settling in to be pretty exciting
especially if it's a busy area with a lot to see and do
sorry not the bachelor part specifically lol
Aditya
@ezioda004
Dec 06 2018 16:47
@cmccormack Oh yeah that is true, I'm excited for that too but I wanna settle into a nice apartment so I can complete and get full stack certificate and start planning for next job
Maybe thats being too ambitious, but a man can dream :D
Jason Luboff
@JLuboff
Dec 06 2018 16:50
Man, already planning the next job!
Aditya
@ezioda004
Dec 06 2018 16:55
@JLuboff Haha yeah, I hope I wont get lazy
I wanna apply to Google but I know I'll get obliterated if I apply right now
So I'm hoping like in 6 months or so I can apply to it
Jason Luboff
@JLuboff
Dec 06 2018 17:00
@ezioda004 Ambitious, I like it
Aditya
@ezioda004
Dec 06 2018 17:00
Wow this is great!
@cmccormack Thanks!
@JLuboff Maybe too ambitious but having a goal means I wont waste time haha
Jason Luboff
@JLuboff
Dec 06 2018 17:01
That is true
Jeez...SSRS seems overly complex.. lol
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:04
@Pagnito have you been able to get the authentication going?
Good afternoon
Jason Luboff
@JLuboff
Dec 06 2018 17:04
oh shit! @tiagocorreiaalmeida in the house!
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:05
@JLuboff The kind of event you only get to see once in a while :D
Christopher McCormack
@cmccormack
Dec 06 2018 17:05
@tiagocorreiaalmeida heya
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:07
So what have you been doing/learning lately?
Jason Luboff
@JLuboff
Dec 06 2018 17:07
Well.. finished up my SQL certifications.. so thats all good. Now just been working with it and React
What about you?
Aditya
@ezioda004
Dec 06 2018 17:09
@JLuboff Congrats on finishing SQL certs! Where did you do it from?
Pagnito
@Pagnito
Dec 06 2018 17:11
@tiagocorreiaalmeida not yet
Jason Luboff
@JLuboff
Dec 06 2018 17:13
@ezioda004 Thanks! All book learning along with official MS docs and some videos here and there. Than took the tests at local MS testing center
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:16
@Pagnito I will get home quite soon, but as far as I recal you pretty much had to copy their credentials and call the method you defined for the login
@JLuboff congrats!!!! I took a course on graphql and did a few things with it, other than that nothing new
Pagnito
@Pagnito
Dec 06 2018 17:17
@tiagocorreiaalmeida do u know if they make so u dont have save the user to the databse?
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:17
that's handled by them you just call the methods
which one are you using?
Aditya
@ezioda004
Dec 06 2018 17:18
@JLuboff Awesome, do you prefer working with RDBMS or NoSQL?
Pagnito
@Pagnito
Dec 06 2018 17:18
@tiagocorreiaalmeida facebook
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:18
let me login and see if I can help from here
Pagnito
@Pagnito
Dec 06 2018 17:18
so like what if i need all the users emails or something, can i access them?
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:20
As far as I rmemeber you can see them on the board from firebase so im quite sure you can fetch them somehow
Pagnito
@Pagnito
Dec 06 2018 17:20
oh ok
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:20
have you filled the appsecret and ID?
Pagnito
@Pagnito
Dec 06 2018 17:20
yea, is it the same as the clind id and client secret, cuz i was using passport before i decided to host the project on firebase
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:21
then what's missing?
Pagnito
@Pagnito
Dec 06 2018 17:24
I havent implemented the code yet...i mostly looked into auth yesterday. But spent alot of time configurin express with the functions server to serve things correctly
Jason Luboff
@JLuboff
Dec 06 2018 17:25
@tiagocorreiaalmeida Thanks man!
Pagnito
@Pagnito
Dec 06 2018 17:25
Im not sure i have the right api key atm...im startin up the projevt right now and ill let u know if i have any problems and thnak you
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:26
np @Pagnito will paste here a bit of code from a course I saw that supports google login using firebase, might help
Jason Luboff
@JLuboff
Dec 06 2018 17:26
@ezioda004 Mmm.. I think NoSQL is generally easier to work with when it comes to a small Node app. But.. as I've become more experienced with RDBMS (specifically MS SQL), I've started to prefer it mainly due to building my new projects with it
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:26
 import * as firebase from 'firebase';

const config = {
  apiKey: process.env.FIREBASE_API_KEY,
  authDomain: process.env.FIREBASE_AUTH_DOMAIN,
  databaseURL: process.env.FIREBASE_DATABASE_URL,
  projectId: process.env.FIREBASE_PROJECT_ID,
  storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
  messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID
};

firebase.initializeApp(config);

const database = firebase.database();
const googleAuthProvider = new firebase.auth.GoogleAuthProvider();

export { firebase, googleAuthProvider, database as default };
firebase.auth().signInWithPopup(googleAuthProvider);
but once I get home will let you know @Pagnito
Pagnito
@Pagnito
Dec 06 2018 17:27
k
one question
  <script defer src="/__/firebase/5.6.0/firebase-app.js"></script>
  <!-- include only the Firebase features as you need -->
  <script defer src="/__/firebase/5.6.0/firebase-auth.js"></script>
  <script defer src="/__/firebase/5.6.0/firebase-database.js"></script>
  <script defer src="/__/firebase/5.6.0/firebase-messaging.js"></script>
  <script defer src="/__/firebase/5.6.0/firebase-storage.js"></script>
  <!-- initialize the SDK after all desired features are loaded -->
  <script defer src="/__/firebase/init.js"></script>
is this the same as import firebase? it was generated in the html by firebase
and if yes, should i use firebase from npm instead
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:29
are you using nodejs?
Pagnito
@Pagnito
Dec 06 2018 17:29
ya
Tiago Correia
@tiagocorreiaalmeida
Dec 06 2018 17:29
then makes more sense to grab the package in my opinion
Pagnito
@Pagnito
Dec 06 2018 17:29
k
Brad
@bradtaniguchi
Dec 06 2018 18:34
@Pagnito You save users for their information, like how do you know if someone is registered with the app? You don't have to save them, but you can if you need their info saved somewhere, and want to save stuff "to" them. You could save everything and just use the googleId provided by firebase to identify the user too.
Pagnito
@Pagnito
Dec 06 2018 18:38
@bradtaniguchi i see
so how does firebase check if the user is logged in after the initial log in once i navigate the pagaes
Brad
@bradtaniguchi
Dec 06 2018 18:43
@Pagnito logged into google?
Pagnito
@Pagnito
Dec 06 2018 18:44
no my app
Brad
@bradtaniguchi
Dec 06 2018 18:44
Yea.... what auth service are you using for firebase?
Pagnito
@Pagnito
Dec 06 2018 19:03
facebook
dam my bundle went from 176k to 990 after importing firebase T.T
Brad
@bradtaniguchi
Dec 06 2018 19:07
Sorry I assumed you were using google, same idea applies. Facebook should return you some information that is like a unique ID for each user, that can be the identifier for the user's stuff within firebase, or you save the entire object into your database, its up to you
and yea firebase is pretty big
Christopher McCormack
@cmccormack
Dec 06 2018 19:07
You can often adjust your requires to import the specific module you need rather than the whole thing for a much smaller file size
Brad
@bradtaniguchi
Dec 06 2018 19:09
@cmccormack that might help, but even after running all the fancy stuff angular ships with, just doing a minimal firebase example bloats the vendor file. I assume it has todo with all the fancy real-time database crap
Pagnito
@Pagnito
Dec 06 2018 19:11
im really rethinking doing the auth, i dont tihnk its worth importing all that jus for an auth btn
Brad
@bradtaniguchi
Dec 06 2018 19:12
@Pagnito did you run any tree-shaking fancy bundle minimizing to see how it really impacts you?
Pagnito
@Pagnito
Dec 06 2018 19:12
no, i forgot how to do it, i remember someone told me about it and it was in the course i took, but i dont remember how to do it
Nate Mallison
@NJM8
Dec 06 2018 19:13
Is that the gzipped size?
Pagnito
@Pagnito
Dec 06 2018 19:17
i dunno
i got this error

It looks like you're using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK components you intend to use.

For the module builds, these are available in the following manner
(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):

CommonJS Modules:
const firebase = require('firebase/app');
require('firebase/<PACKAGE>');

ES Modules:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

Typescript:
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

oh i think i got it
Brad
@bradtaniguchi
Dec 06 2018 19:20
That's nice of them to say that haha
Pagnito
@Pagnito
Dec 06 2018 19:26
export 'default' was not found in 'firebase/auth'
cant understand y im getting this
actually hold on
Aditya
@ezioda004
Dec 06 2018 19:28
@JLuboff Interesting, I plan to learn SQL again soon (learned it in highschool) and relatively felt easier than NoSQL.
Pagnito
@Pagnito
Dec 06 2018 19:29
export {firebase, provider, database, auth as default };
"export 'auth' was not found in './index.js'
const auth = firebase.auth()
i use export const auth = firebase.auth and it worked
Jason Luboff
@JLuboff
Dec 06 2018 19:42
@ezioda004 I found NoSQL (well..mongo) easier, I think only becuase it integrates into Node so easily. I've since learned how to integrate with SQL but it definitely is more work (creating the relationships, etc)
Pagnito
@Pagnito
Dec 06 2018 19:52
wit the imports firebase recomended, my bundle is still 555k, compare to the 176 i had before O.o
Pagnito
@Pagnito
Dec 06 2018 20:13
lol i thought this was funny
Christopher McCormack
@cmccormack
Dec 06 2018 20:14
lol
Brian
@BrianCodes33
Dec 06 2018 20:37
someone tell me why there needs to be an default statement ? why cant i just say export MyComponent instead of export default MyComponent??
Christopher McCormack
@cmccormack
Dec 06 2018 20:38
there doesn't have to be a default
but if you want to import it with a name of your chosing you can do that with the default
otherwise you're just importing the method name
Aditya
@ezioda004
Dec 06 2018 20:39
You could do that but then you need to import it like
import { MyComponent } from "fileName";
Brian
@BrianCodes33
Dec 06 2018 20:40
so what does default actually provide me/do?
Christopher McCormack
@cmccormack
Dec 06 2018 20:41
but if you want to import it with a name of your chosing you can do that with the default
Amit Patel
@AmitP88
Dec 06 2018 20:41
hey guys, I'm working on the Simon game and I'm trying to get the whole button pattern to light up when it's the computer's turn, but it's only lighting up the last item in the pattern. In the console, the computers button pattern is stored in an array called computerInput, and whenever it's the computers turn, the array is always correct, yet only the last item in the array lights up. I know it has something to do with my for loop or my switch statement inside of it, but from what I've checked everything looks correct and I can't see what I'm doing wrong.
I'm using react/redux btw
Aditya
@ezioda004
Dec 06 2018 20:41
Its a fallback or "default" import as the name suggests. A file can only have one of that.
The name can be changed of named imports too like:
import  { MyComponent as Component } from "fileName";
Pagnito
@Pagnito
Dec 06 2018 21:16
@tiagocorreiaalmeida hey
Amit Patel
@AmitP88
Dec 06 2018 21:45
@AdelMahjoub hey man, thanks so much for trying to help with my Simon game. I'll keep going at it and study about promises and recursion. I'm sure there's a way to do this even with redux
Pagnito
@Pagnito
Dec 06 2018 22:12
anyone know how to use passport facebook strategy with a json webtoken
Brad
@bradtaniguchi
Dec 06 2018 22:46
Time to develop on my laptop just cuse I can instead of my work computer :D
Jason Luboff
@JLuboff
Dec 06 2018 22:46
@bradtaniguchi But...then you only have one screen!
Brad
@bradtaniguchi
Dec 06 2018 22:46
But I have 4 virtual screens!, and I'm writing/running tests so I don't need anything but vscode
Jason Luboff
@JLuboff
Dec 06 2018 22:48
I'll stick with my 3 regular screens :P
Amit Patel
@AmitP88
Dec 06 2018 23:02
hey guys, in react/redux, is there a way to iterate through an array and dispatch actions for each array item?
I tried googling this, but didn't find much on this specific topic
alpox
@alpox
Dec 06 2018 23:04
@AmitP88 Sure, the same way you do with normal functioncalls
Amit Patel
@AmitP88
Dec 06 2018 23:05
@alpox I thought so too, but when I tried this, it would only dispatch an action for the last element in the array:
        /* loop through computerInput and press colored squares based on each index value */
        for(let i = 0; i < this.props.computerInput.length; i++){
            /* based on what input is in computerInput state,
               dispatch action that lights up corresponding colored square */
            switch(this.props.computerInput[i]){
                case 'red':
                    store.dispatch(redClicked());
                    setTimeout(() => {
                        store.dispatch(redReverted());
                    }, 300);
                    break;
                case 'green':
                    store.dispatch(greenClicked());
                    setTimeout(() => {
                        store.dispatch(greenReverted());
                    }, 300);
                    break;
                case 'blue':
                    store.dispatch(blueClicked());
                    setTimeout(() => {
                        store.dispatch(blueReverted());
                    }, 300);
                    break;
                case 'purple':
                    store.dispatch(purpleClicked());
                    setTimeout(() => {
                        store.dispatch(purpleReverted());
                    }, 300);
                    break;
                default:
                    console.log(this.props.computerInput[i]);
            }
        }

            // Ends computers turn and starts player turn
            store.dispatch(playersTurn());
        }, 1000);
so if there was an array with ['red', 'green', 'blue'] it would only dispatch for the blue item
someone told me that I need to dispatch only when the last dispatch finishes, but I'm not sure how to do that with this code situation
Brad
@bradtaniguchi
Dec 06 2018 23:13
y setTimeouts?
I feel like this is working correclty, BUT when you go through the loop, it goes through each move basically instantly, the set-timeout is a callback, and that callback is fired almost all at the same time, but in order
thus I assume all the "distpatches" in the setTimeout callbacks are fired more or less at the same time (as the for loop iteration, but 300 ms later)
Amit Patel
@AmitP88
Dec 06 2018 23:17
ah, I see. This is for the Simon game, and this is basically looping through the computers moves and changing the buttons css class in the switch statement (the change in class switches the buttons from a dark color (default) to a light color, making it appear like the button is being temporarily lit up)
the setTimeout is a little pause before the buttons are pressed by the computer, so that it doesn't occur too fast for the player to see
Pagnito
@Pagnito
Dec 06 2018 23:20
i cant understand why my res.cookie isnt setting a god damn cookie
Brad
@bradtaniguchi
Dec 06 2018 23:25
@AmitP88 I think you need to re-think your setTimeout, since JS wont "wait" when iterating over the loop of all the actions to dispatch. (I'll leave the real solution to you the reader :P)
creator0323
@Amasian
Dec 06 2018 23:29
@bradtaniguchi Hello! :) I hope everything going well these days
Brad
@bradtaniguchi
Dec 06 2018 23:29
@Amasian Hello, and thank you :D
Jason Luboff
@JLuboff
Dec 06 2018 23:30
@AmitP88 When I did the Simon game..I had two setTimeouts.. as well as some math in one of them..
Amit Patel
@AmitP88
Dec 06 2018 23:31
@bradtaniguchi hmmm, so basically I would have to find a way for the setTimeout to be delayed?
@JLuboff hmm I see. Was it one setTimeout for iterating over the moves array and another one for the dispatch actions?
Brad
@bradtaniguchi
Dec 06 2018 23:34

some math in one of them

hehehe

Tom
@moT01
Dec 06 2018 23:35
got my hacktoberfest shirt today
Jason Luboff
@JLuboff
Dec 06 2018 23:35
Its been a while..but if I remember correctly.. I would loop over my array of moves
for (let i = 0; i < moveArray.length; i++){
setTimeout(() => {callMyFunctionWhichHasAnotherTimeout}, i * 500)
}
Tom
@moT01
Dec 06 2018 23:35
yay
Jason Luboff
@JLuboff
Dec 06 2018 23:35
@bradtaniguchi I mean...its not a lie lol
Brad
@bradtaniguchi
Dec 06 2018 23:36
Nice, I need more programmer/tech t-shirts. I have like 2 haha
Amit Patel
@AmitP88
Dec 06 2018 23:36
@JLuboff oh I see. Ok, let me see what I can do
Jason Luboff
@JLuboff
Dec 06 2018 23:37
I have no programmer/tech shirts :shrug:
Tom
@moT01
Dec 06 2018 23:37
came with a bunch of stickers, and a coaster - yay
Jason Luboff
@JLuboff
Dec 06 2018 23:39
Ew... Microsoft is adding a light theme to Windows 10
Pagnito
@Pagnito
Dec 06 2018 23:53
for some reason res.cookie doesnt send a cookie, but res.header('auth', token) works and i get my token in the res headers