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

  • SEARCH
  • Home
  • 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 8082307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:03:11+00:00 2026-06-05T17:03:11+00:00

I am a beginner in Knockout and I must say I often get confused

  • 0

I am a beginner in Knockout and I must say I often get confused regarding when to use (). Is there any general tip/trick regarding when would you use () against when you would not because at the moment I am just doing trial and error. If the binding throws error or doesn’t update values I remove () else I put.

  • 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-05T17:03:15+00:00Added an answer on June 5, 2026 at 5:03 pm

    You use () in knockout when using observables or when executing any other method.
    Knockout observables are functions, invoked to return you what you looking for or allow you to assign new values.

    In knockout you use object.property() to retrieve a value and object.property(newValue) to assign a value to that property.

    On the knockout website checkout the documentation, specifically the section on observables, which shows you the use of the () when querying and writing observables.

    To quote:

    var myViewModel = {
        personName: ko.observable('Bob'),
        personAge: ko.observable(123)
    };
    
    • To read the observable’s current value, just call the observable with no parameters. In this example, myViewModel.personName() will
      return ‘Bob’, and myViewModel.personAge() will return 123.

    • To write a new value to the observable, call the observable and pass the new value as a parameter. For example, calling
      myViewModel.personName(‘Mary’) will change the name value to ‘Mary’.

    • To write values to multiple observable properties on a model object, you can use chaining syntax. For example,
      myViewModel.personName(‘Mary’).personAge(50) will change the name
      value to ‘Mary’ and the age value to 50.

    Knockout’s interactive tutorial is also quite nice and well worth going through.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Beginner in Symfony2, so maybe it's a dumb question. I would need to get
Beginner here, I have a simple question. In Android what would be the best
I am a beginner to the Javascript MVC framework Knockout.js Coming from conventional Javascript
Beginner android question. Ok, I've successfully written files. E.g. // get the file name
Beginner question -- what do you usually use as a multimap? I want a
Rails beginner here. I want to use a few plugins (such as videoJS or
Beginner rails/javascript question: Let's say that I have a simple Circle model in a
Beginner here trying to get a pipeline working in bash. If somebody can see
Beginner question: I would like to pass in window.location.hash to my form action parameter.
beginner PHP programmer here trying to use the mailchimp API... I keep getting this

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.