File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
JavaScript Problem Solving Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ "use strict" ;
2+ // TOPIC /////////////////////////////////////////////////////////////////////////////////////////////////////
3+ //
4+ // "Very Easy" JavaScript Problems.
5+ //
6+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////
7+ //
8+ // 1. Very Easy Problems.
9+ //
10+ // NOTES /////////////////////////////////////////////////////////////////////////////////////////////////////
11+ // 1. Problem solving questions and answers from edabit under "very easy". The goal is to go through every
12+ // one of edabit's problems and save some of the more interesting ones on documents like this for future
13+ // reference.
14+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////
15+
16+ /*
17+ Title:Is the Last Character an N?
18+ Create a function that takes a string (a random name). If the last character of the name is an "n", return true, otherwise return false.
19+ /////////////////////////////////////////////
20+ */
21+ function isLastCharacterN ( word ) {
22+ let lastLetter = word . endsWith ( 'n' ) ;
23+ if ( lastLetter ) {
24+ return true ;
25+ } else {
26+ return false ;
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments