Day 1: Let and Const in Javascript | 10 Days Of JavaScript Solutions | HackerRank Programming Solutions [💯Correct]

Hello Programmers/Coders, Today we are going to share solutions of Programming problems of HackerRank, 10 Days Of JavaScript. At Each Problem with Successful submission with all Test Cases Passed, you will get an score or marks. And after solving maximum problems, you will be getting stars. This will highlight your profile to the recruiters.

In this post, you will find the solution for Day 1: Let and Const in JavaScript-HackerRank Problem. We are providing the correct and tested solutions of coding problems present on HackerRank. If you are not able to solve any problem, then you can take help from our Blog/website.

Use “Ctrl+F” To Find Any Questions Answer. & For Mobile User, You Just Need To Click On Three dots In Your Browser & You Will Get A “Find” Option There. Use These Option to Get Any Random Questions Answer.

Introduction To JavaScript

JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments also use it. JavaScript can be used for Client-side developments as well as Server-side developments. JavaScript contains a standard library of objects, like Array, Date, and Math, and a core set of language elements like operators, control structures, and statements.

Advantages of JavaScript

The merits of using JavaScript are −

  • Less server interaction − You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
  • Immediate feedback to the visitors − They don’t have to wait for a page reload to see if they have forgotten to enter something.
  • Increased interactivity − You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
  • Richer interfaces − You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.

Link for the ProblemDay 1: Let and Const – Hacker Rank Solution

Day 1: Let and Const – Hacker Rank Solution

Problem:

Objective

In this challenge, we practice declaring variables using the let and const keywords. Check out the attached tutorial for more details.

Task

  1. Declare a constant variable, , and assign it the value Math.PI. You will not pass this challenge unless the variable is declared as a constant and named PI (uppercase).
  2. Read a number, , denoting the radius of a circle from stdin.
  3. Use  and  to calculate the  and  of a circle having radius .
  4. Print  as the first line of output and print  as the second line of output.

Input Format

A single integer, , denoting the radius of a circle.

Constraints

image 11

Output Format

Print the following two lines:

  1. On the first line, print the  area of the circle having radius .
  2. On the second line, print the perimeter  of the circle having radius .

Sample Input 0

2.6

Sample Output 0

21.237166338267002
16.336281798666924

Explanation 0

image 10
Day 1: Let and Const – Hacker Rank Solution
function main() {
    let r = readLine();
    const PI = Math.PI;
    console.log(PI * r * r);
    console.log(2 * PI * r);
}

33 thoughts on “Day 1: Let and Const in Javascript | 10 Days Of JavaScript Solutions | HackerRank Programming Solutions [💯Correct]”

  1. Hráči stále hrajú a vám zostáva jediné. Začať tiež hrať alebo sa pobrať domov, veď hra bude pokračovať možno do rána. Dnes sa nehrá o peniaze, ale o postup do turnaja, ktorý bude na druhý deň. No ak to predsa len chcete skúsiť, môžete si zapnúť počítač a zahrať si on-line, o virtuálne peniaze. A nabudúce možno prídete do ozajstnej herne. Zdokonalíte sa a prídete znova. Poker je skrátka vášeň. Tohle není absolutně knížka pro začátečníky. Je tam hodně zbytečností, které začínajícím hráčům akorát zblbnou hlavu Nie je možné meniť veľkosť písma, formát je preto vhodný skôr pre väčšie obrazovky. „Dovtedy ma napĺňalo všetko okolo pokru, že mám rozprávkový život, robím niečo, čo ma baví a peniaze mi idú na účet prakticky automaticky. Nikdy som nehral pre peniaze. Vždy som hral kvôli zábave a peniaze chodili k tomu,“ vysvetľuje Palovič. Objavil sa na turnaji aj pred rokom, nehral však pre seba. To, čo vyhral, išlo občianskemu združeniu, taká forma je pre neho prijateľná.
    http://dokunsystem.com/bbs/board.php?bo_table=free&wr_id=33109
    Tuhle službu využíva už hodne server hostingu či menších smskey obchodú. Úhrada diaľničnej známky pre viac vozidiel (online platba) V prípade kontroly cestovných lístkov sa preukážete revízorovi alebo vodičovi autobusu Vašim mobilným telefónom s otvoreným SMS lístkom. Zakúpením SMS lístka vyjadrujete súhlas na to, že revízor alebo vodič autobusu má právo prečítať si celý obsah SMS správy ako aj zobraziť ďalšie detaily správy (odosielateľ, čas doručenia a pod.). Vyžaduje sa pri tom Vaša plná súčinnosť. Tipsport casino patrí medzi slovenské online kasíne, ktoré majú najširšie možnosti vkladu do hráčskeho účtu. Samozrejme nemôže chýbať SMS platba, ktorá aj v Tipsporte patrí tiež ku obľúbeným platbám. Táto platba v Tipsporte je povolená zo všetkých slovenských telekomunikačných operátorov Orange, 4Ka, telekom a O2.

    Reply
  2. One of the main benefits of Slotomania VIP Premium is access to exclusive VIP slot machines. These machines are only available to VIP Premium players and offer higher payouts and unique bonus rounds. These special slot machines also come with high betting limits, allowing players to place larger bets and potentially win even more. Download The Slotomania Vip Apk Latest Version, The Best Casual Game of Android, This Apk Is Provide Unlocked All Premium Features & No Ads. Install Your Apk Now. Slotomania is one of my personal favorite games and I love the Slotomania VIP program. Play regularly and level your status up to enjoy better and more benefits. Slotomania is one of my personal favorite games and I love the Slotomania VIP program. Play regularly and level your status up to enjoy better and more benefits.
    https://cadplm.co.kr/bbs/board.php?bo_table=free&wr_id=20862
    Take part in the fun with a fast-paced game of D21 also known as Digital Blackjack. Digital Blackjack has become the most popular table game at Harrah’s Casino in Cherokee.The digital version of this popular game includes live dealers, real chips, a six deck shoe, and Las Vegas rules to create an exciting table game experience for the players. Free video poker is not rigged – the cards dealt are always completely random. If you keep winning free online video poker, you might think the casino is making it easy to encourage you to play real money. However, this is not true. Casinos are audited by independent firms. They verify that their software is completely random, as well as certifying the claimed payouts. All Shamrock 7s machines require different than the typical five coins to trigger the progressive jackpot. This can make it difficult to compare to other games. The progressive jackpot reset is usually 500 to 1. This means a quarter machine requires eight coins for $1,000. Half-dollar games require $4 for $4,000. The dollar and two-dollar machines require four coins.

    Reply

Leave a Comment

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker🙏.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock