Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Digit Count program #234

Open
wants to merge 5 commits into
base: master
from

Conversation

@Utsav1999
Copy link

Utsav1999 commented Jul 25, 2020

Welcome to JavaScript community

Describe your change:

I added a program that will ask a user to give a number as an input. Then it will count the number of digits present in the number and will print it to the console.

Utsav1999 added 2 commits Jul 25, 2020
@Utsav1999
Copy link
Author

Utsav1999 commented Jul 28, 2020

how to add npm standards?

@nandanvasudevan
Copy link
Contributor

nandanvasudevan commented Aug 2, 2020

how to add npm standards?

Just run npm install, it will install all the dependecies.
Then run standard CountDigit.js
Fix the errors and push

@Sheraff
Copy link

Sheraff commented Aug 6, 2020

This doesn't work for 0 I think. It will return -Infinity.

Utsav1999 added 2 commits Aug 7, 2020
@Utsav1999
Copy link
Author

Utsav1999 commented Aug 7, 2020

@Sheraff thanks for notifying me. I have updated my program and it's working fine now.

}

console.log('The number of digits in the number: ' + CountDigit(parseInt(prompt('Enter number: '))));

This comment has been minimized.

@itsvinayak

itsvinayak Aug 7, 2020 Member

@Utsav1999, thank you for your contribution

this is from the library function
const prompt = require('prompt-sync')();
this line is required
we are using nodejs to run and test code.
prompt is a lib function to take input, window.prompt will not work in node
to install
npm install prompt-sync

resource

@itsvinayak

@itsvinayak itsvinayak self-requested a review Aug 7, 2020
@itsvinayak itsvinayak dismissed their stale review Aug 7, 2020

some thing went wrong

@Utsav1999
Copy link
Author

Utsav1999 commented Aug 11, 2020

any update @itsvinayak ?

Copy link
Member

itsvinayak left a comment

@Utsav1999, thank you for your contribution

this is from the library function
const prompt = require('prompt-sync')();
this line is required
we are using nodejs to run and test code.
prompt is a lib function to take input, window.prompt will not work in node
to install
npm install prompt-sync

resource
plz make this change

@itsvinayak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.