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 7419783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:07:49+00:00 2026-05-29T08:07:49+00:00

There is a website called Gild.com that has different coding puzzles/challenges for users to

  • 0

There is a website called Gild.com that has different coding puzzles/challenges for users to do. They can be completed in wide array of languages including Javascript. I am interested in solving these puzzles in Javascript, but I am unsure of the following:

  • How am I supposed to access the input file which is supposed to be passed as an argument?
  • How am I supposed to output the result?

My understanding of Javascript is that it is run from within an HTML page and that output really is only in the form of placing values in the HTML, modifying the DOM, etc. For that reason it is not clear to me how Javascript can be used for solving these types of problems. Can someone who has used Gild before or has some insights into my question suggest how to proceed?

An example of a problem would be: the given input file contains a positive integer, find the sum of all prime numbers smaller than that integer and output it.


EDIT: Some of the solutions below involve using external resources, but on Gild, I am supposed to put my solution in their editor and then submit it that way, like the following picture shows:

enter image description here

In other words, I don’t think my solution can have access to Node.js or other external resources.


Edit: Here are some interesting articles that I have found that I think are the answer to my question:

  • http://www.phpied.com/installing-rhino-on-mac/
  • http://www.phpied.com/javascript-shell-scripting/
  • 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-05-29T08:07:50+00:00Added an answer on May 29, 2026 at 8:07 am

    I haven’t spent much time on Gild, but I do a lot of similar types of problems on Project Euler. I think the best way to go is probably Node.js.

    If you’re not familiar, Node is basically server-side JavaScript that runs in Google’s V8 engine. Installing it on your own Mac/Windows machine takes about 2 minutes. It’s also really fast (considering it’s JavaScript).

    And you’d use it like this:

    var fs = require('fs'); // the filesystem module
    var contents = fs.readFileSync('theFile.txt', 'utf-8');
    // Do stuff with the file contents...
    

    Everything after those first two lines can be done with the same JS you’d write in the browser, right down to calling console.log() to spit out the answer.

    So, if you wrote your script in a file on your desktop called getprimes.js, you’d open up your terminal and enter node ~/Desktop/getprimes.js (assuming you’re on a Mac)

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

Sidebar

Related Questions

There is a website called: Engrade.com. It's pretty cool, you can monitor what your
there is this awesome website called www.engrade.com. You can get your grades from the
Is there any website which provides core java based programming challenges that tests programming
There is a website (called the Anti-if campaign) that talks about how to replace
Lets say there is a website called www.hello.com So what really is www -
Is there a way that I can have different directory names per installation of
I have a website called example.com with several internal pages that are liked. I
Assume there is a website called http://example.com/a the website is being developed using PHP,
Is there a website I can create an HTML final four bracket? Or is
Is there a website that lists all of the publicly available JQuery plugins? Also,

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.