« first day (2780 days earlier)      last day (2182 days later) » 

12:32 AM
@towc thanks
 
 
6 hours later…
6:38 AM
anyone here know socket.io?
cause I need a structure similar to a function that can return a value, however it's requesting it over the network.
so function () { return 'some value' } but in socket data = socket.request("data")
where the server would respond to the socket.request method with some piece of information
 
@JacobSchneider Look at Promises and async functions
 
Hi all, Can someone please guide me on how to use redux with reactjs. I am trying to build bank account details submit form
 
@MadaraUchiha Thanks
 
I am not able to understand how to take input from submit form and store it in redux ?
How can I take the input values from form and store it in redux state variables ? Do I need to create state variables for storing firstname, lastname, email id, bank acc number, etc or will single state variable be sufficient .
Hey anyone online ? Can someone help me in clearing my redux doubts ?
 
7:43 AM
 
7:59 AM
Morning all
This question may make more sense if you know .net, but in .net we have a extension methods.
If I want to add something new like an extension method, is this what prototype is ?
For example, if I want to create a "where" clause on a array, would I do it via prototype
I have to leave for an hour, sorry if I response is slow :(
 
8:58 AM
Good morning guys
 
@Learner Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Alright I will keep that in mind
 
9:35 AM
@MadaraUchiha 27th of June still good for JSIL?
The event moved from the 26th to the 27th
 
9:49 AM
morning
 
10:20 AM
@BenjaminGruenbaum Wednesday?
 
My dudes
(yes)
 
JSIL?
 
It's a meetup here, pretty big for a meetup
 
an online conference?
cool
 
It's not online, it's a physical meetup
 
10:23 AM
> here
where is here then?
 
Tel Aviv
 
11:24 AM
@SterlingArcher mhm, so the next question is should that be sent in some hidden DOM during initial request or should it be AJAXed into the page afterwards
 
11:55 AM
HeY can someone help me with redux store?
 
12:19 PM
Just post your quiesion her.es
 
12:30 PM
Happy Birthday @GNi33
 
@GNi33 it's your birthday :O?
Happy birthday!
 
1:32 PM
Happy birthday @GNi33 !! :D
 
1:53 PM
Happy birthday, @GNi33!
 
2:49 PM
guys help please
how to validation the input (type="file") by javascript??
i need the input uploading the images only
iam tried to use this code
<div class="dv">
        <input name="image" type="file" id="fileName" accept=".jpg,.jpeg,.png" onchange="validateFileType()"/>
    </div>
    <script type="text/javascript">
        function validateFileType(){
            var fileName = document.getElementById("fileName").value;
            var idxDot = fileName.lastIndexOf(".") + 1;
            var extFile = fileName.substr(idxDot, fileName.length).toLowerCase();
            if (extFile=="jpg" || extFile=="jpeg" || extFile=="png"){
but it just give alert and press ok i the file still uploaded and i can press submit
how to remove the uploaded file??
 
@AbdallahEl-Rashedy Read about preventDefault()
 
@MadaraUchiha its jQuery only??
like this?
its still not working
 
1 message moved to Trash can
@AbdallahEl-Rashedy Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
3:17 PM
@AbdallahEl-Rashedy It isn't.
 
3:28 PM
Hi, I have a problem with async and await. Im new to this, and I dont understand why it gives me a "await is a reserver word"

async function getAsyncstorageToken() {
	let token = await AsyncStorage.getItem('id_token');
	return token;
}
export default function APICALL(url){
	const token = await getAsyncstorageToken();
}
Oh haha now everything is a codeblock. A well. It's been taking quite a lot of time now, of something I think'll turn out to be something simple :')
the error occures in the APICALL function, anyone here who can point me in the right direction?
 
What error?
 
"await is a reserved word"
 
export default async function APICALL
Gotta use the async for any function that uses await
 
Because APICALL isn't an async function.
 
ohh
I assumed that you define a function async, and then can use it with await
so the 'wrapping' function has to be async too
Haha that took a whole lot more time then this problem was worth
Thanks!
 
3:35 PM
np :)
 
3:49 PM
In javascript, all element of array are its property?
 
@KingTut yes
+ its length and some other stuff sometimes
 
so if i have var list = [1,2,"16"]; then list[2] gives 16here 2 is a propert
list["length"] so length is a propery
similarly is an index a property of array
 
in a way, yes
benjamin already confirmed
 
No is the element property or index
 
indices are property names
 
3:53 PM
@Benjamin Thank you!! @Towc Thank you too!!
@towc Hmm similar as length is a property name?
 
wow, it seems like sokra is rushing through webpack 4.x like there is a plane to catch
 
"length" is a property name
array.length is a property
 
4.9.1 already in a couple of weeks
 
Oh yeaaa
confusing
terminology
 
@KingTut in JavaScript, an array is just an object with the prototype Array.prototype, array indices are definied to be properties that are coercible to UInt32 (-1). That's just language-lawyer talk though.
Let me find you a quote from the (old and simpler) language spec
 
3:57 PM
> [] is a laymen's term for Object.create(Array.prototype)
 
@towc I hope you realize that there are big differences between the two and they're not similar at all
 
@BenjaminGruenbaum that will take some time for me to understand
 
[] is an array initializer that roughly does the same thing as Array()
 
I guessed there would, trying to figure them out now
 
Seriously @towc?
!!> var a = Object.create(Array.prototype); a[0] = 15; a.length;
 
3:58 PM
@BenjaminGruenbaum 0
 
It's not an array instance, so length isn't maintained.
 
Why did caprica respond
 
oh, I tried with a.push, it worked fine, with length and all
 
Because caprica is our bot, we use caprica to run stuff inline to help illustrate points @KingTut
 
hm sorcery
 
4:00 PM
> The Array prototype object is itself an array; its [[Class]] is "Array", and it has a length property (whose initial value is +0) and the special [[DefineOwnProperty]] internal method described in 15.4.5.1.
length is special in arrays - that's the one "difference"
You can build your own with proxies - but that would be a waste of time since arrays are very well optimized if you don't mess with them :)
 
!!> var a = Object.create(Array.prototype); a.push(15); a.length
well, try that
 
I believe you it works because I know it does :) That's just how arrays work
Which is why I used property assignment rather than it to show the point :D
.push updates .length - see step 6 in es5.github.io/#x15.4.4.7
 
well, you said "length isn't maintained", which I thought wasn't accurate
that's all
 
It isn't maintained, "sometimes" maintained means not maintained.
That's like saying that a code that returns the value 5 90/100 times and returns 3 the rest of the time isn't code that returns 5. It's true although it sometimes and in fact most times returns five. When we say "X does Y" we mean "X always does Y".
 
but when you say "X doesn't do Y", most of the time I understand "X never does Y"
sure, the Object.create variant doesn't always maintain length
I'm really not trying to be a pain. I'll drop it now
I'm considering going out for a bike ride in underpants
anything that could go horribly wrong?
 
4:50 PM
👍
 
bleh... Babel keeps creating runtime errors for me.
 
@jAndy What's the code you're trying to compile?
 
5:43 PM
> witter drama is weird even at the best of times, but this week's one was unique at best. Elon Musk tweeted on Wednesday that he is "going to create a site where the public can rate the core truth of any article" and "track the credibility score over time of each journalist, editor & publication."
@MadaraUchiha maybe he would buy TR :D
 
@Mosho Maybe
Maybe I should ping Uri with this info :P
 
maybe :P
 
@MadaraUchiha lots of es6 classes, es6 mixins (class extends xxx) and the usage of this and super a lot
really looks like Babel isn't really able to get nested and somewhat "complicated" code that way
 
@jAndy We have all of those (admittedly we now use TypeScript, but that wasn't always the case) and we really didn't have problems with Babel
 
6:02 PM
@GNi33 ois guade zum Gebuatsdog
5
 
^^ Happy Birthday man!
 
the birthday mafia in room 17 is real
 
Ah, saved it :D
 
Anyone can help me with this topic ?
1
Q: AJAX / JQuery - setInterval stop after keyup

Lamberto Fredrick NababanI'm currently working on a live search using ajax However I'm stuck on the interval part with my searchbox. What works: setInterval running if I am doing nothing with searchbox setInterval stop when I am searching (input keyword) in searchbox What does not work: After I deleted my keyword...

 
@LambertoFredrickNababan Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
6:11 PM
@LambertoFredrickNababan btw, you're not passing the query in the setInterval function, as an argument
 
@towc can you give an example answer to my question ?
 
sorry, no
 
6:35 PM
@MadaraUchiha I just don't have the time to really dig into the problem, all I can tell is, that pure code runs flawlessly and the Babel'ed version produces run-time errors. I just saw that the whole es6/mixin stuff also is wrapped into async handlers, will be a real pleasure to analyse the babel code
 
@jAndy What preset?
 
es2015 and es2017
 
6:57 PM
was randomly looking at the contributors for mdn's array.splice, and look who I found: developer.mozilla.org/en-US/profiles/bjb568
 

« first day (2780 days earlier)      last day (2182 days later) »