-
-
Save Vijaysinh/cd8e8b5ceeba95b03699edf396c31f16 to your computer and use it in GitHub Desktop.
CodeFights: shapeArea(n) Challenge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://nick3499.medium.com/codefights-shape-area-challenge-3319d3e6dc62 | |
function shapeArea(n) { | |
init = 1; | |
return init + (n * ((n - 1) * 2)); | |
} | |
console.log(shapeArea(4)); |
Author
Vijaysinh
commented
Dec 3, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment