Message from JavaScript discussions

July 2018

— I'm from India. How about you?



— Https://
what is the { commit } means there? is that paramater? why it has {}?

Message permanent page

— Destructuring

— It's the same as:

getAllProducts(x) {
var commit = x.commit;
delete x;
// ...


function doSomething({ foo }) {
return foo;

var myObj = { foo: 'bar' };
doSomething(myObj); // 'bar'

Message permanent page

— This works the same:

function doSomething(obj) {

— I see, thank you

— Guys is it safe approch to send jwt as a query parameter?
for oauth2 authentication i am redirecting user from app to oauth page. then i am sending acess token to server. server verifies user and redirects to client with jwt in url as query parameter

Message permanent page

— Yes, you can use jwt anywhere, the only security concern is generally: WHAT data is stored in the token

Message permanent page

— Because remember: the user can see the data

— Just storing user id