From 2d85ecb31799fc10cee4b3a1f0dce7b4ee129866 Mon Sep 17 00:00:00 2001 From: Resurreccion Date: Tue, 15 Jan 2019 14:54:07 -0800 Subject: [PATCH] Update index.md (#33630) --- .../use-the-parseint-function/index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function/index.md index 322afb295c..5536620d19 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function/index.md @@ -2,9 +2,16 @@ title: Use the parseInt Function --- ## Use the parseInt Function +The ```parseInt()``` function will take any ```string``` parameter representing a number and return its integer value. -This is a stub. Help our community expand it. +## Hint 1 +```parseInt()``` should be used inside your function and return whatever ```str``` is, assuming that ```str``` is a string representing some number. -This quick style guide will help ensure your pull request gets accepted. +## Solution +```javascript +function convertToInteger(str) { + return parseInt(str); +} - +convertToInteger("56"); +```