Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:21:53+00:00 2026-06-08T12:21:53+00:00

Below is the function that does some stuff. ns.Line2Point = function (params) { points

  • 0

Below is the function that does some stuff.

ns.Line2Point = function (params) {
        points = params.points;
        // code here
};

In the code above, params object contains a points object. So, when I want to call Line2Point method, I must create a object, and it contain points object. But, I don’t know how to in Javascript. I just have some ideas like the code below, but don’t know it true or false:

    var params;
    var points;
    // some code to initialize for points object
    params.points = points
    ns.Line2Point(params)

Please teach me this. Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:21:54+00:00Added an answer on June 8, 2026 at 12:21 pm

    as you said you just need to initialize params.

    var params = {};   // initialize to an object literal
    params.points = {}; // points is now an object literal, too
    

    if you already have points, initialize params, then do

    params.points = points; // assign points to the points property of params
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that does custom drawing. Basically it is form fill program
I have a function below that is supposed to check if the array contains
I have tried to create a template function that does some weighted sampling within
Below is my function that will take a timestamp and tell you the time
I have an example function below that reads in a date as a string
Below I have a function that animates a div ( container ) either to
I need a function that can return the difference between the below two dates
I Send Iqueryable to a function that is below void Method<T>(ref IQueryable<T> qu) {
How is this possible that the str_replace() function below returns biWeekly and not Every
I'm appending to a list then throwing that list into a function below: List<ItemBean>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.