A Pen by Mehmet Burak Erman 🦌 on CodePen.
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
| A. Write a function that takes a single string as an argument, and must return A, B, C, or D depending on the following criteria: | |
| If the first character in string is in the set {a,e,i,o,u}, then return A. | |
| If the first character in string is in the set {b,c,d,f,g}, then return B. | |
| If the first character in string is in the set {h,j,k,l,m}, then return C. | |
| If the first character in string is in the set {n,p,q,r,s,t,v,w,x,y,z}, then return D. | |
| B. What is the big O notation for the algorithm you just wrote? |
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
| A. Write a JavaScript program to sum the multiples of 5 and 7 under 1000. Your function must use a while loop. | |
| B. Write the Big O notation of your new function as a comment in the same file. |
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
| 1. Create an array of numbers. | |
| 2. Without using any math operators, write 5 statements: | |
| - Return the first item in the array | |
| - Return the last item in the array | |
| - Add a new item to the end of the array | |
| - Add an array to the beginning of the array. | |
| - Return the first item from the first item in the array. |
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
| Create a function that calculates how many minutes have elapsed from midnight until right now. The function should still return an accurate answer, even if you ran it a few minutes or hours later. |
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
| Write a function that accepts a string. The function should return the last character in the string. |
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
| Write a function that accepts 2 numbers as arguments. The function should return the sum of the two numbers. |
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
| sdf |
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
| sdfsdf |
NewerOlder
