Results 1 to 2 of 2

Thread: Unfamiliar Require JS Assignment

  1. #1
    Join Date
    Mar 2017

    Unfamiliar Require JS Assignment

    The piece of code here is not very clear to me, can someone explain

    const {skill: handler} = require('./skill-sdk');

    especially the left hand side assignment of {skill: handler}.

  2. #2
    Join Date
    Mar 2007

    As for the use abouve, that type of assignment does not look like a legal use of the const declaration, require is not a JavaScript function, its part of node.js which is more of a framework type system which means you should be asking your question in the JavaScript Frameworks forum.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center