Published in The Case of Curious Birds·Jul 14Member-onlyA Dog Named BongoThe small dog that never learned to shut up — Meet Bongo. He’s a small dog that lives with his 36-year-old owner named Lucille. There’s nothing really special about Bongo other than his ability to bark all the time. As you can see, he’s a small dog and everyone knows small dogs have this vocal ability to annoy the shit…Dogs2 min read
Jul 3Member-onlyJavaScript Algorithm: Maximum Edge of a TriangleFinding the maximum possible value of a triangle’s third side — Today, we write a function called nextSide that will accept two arguments, side1 and side2, as integers. You are given the lengths of two sides of a triangle. …Programming2 min read
Jul 2Member-onlyJavaScript Algorithm: Sum of Polygon AnglesFinding the sum of internal angles in a polygon — Today, we write a function called sumPolygon that will accept one integer, n, as an argument. You are given an n-sided regular polygon. The goal of the function is to calculate and return the total sum of internal angles. …Java Script1 min read
Jul 1Member-onlyJavaScript Algorithm: The Farm ProblemHow to count legs… — We create a function called animals that accepts three integers: chickens, cows, and pigs. In this problem, you are given the number of chickens, cows, and pigs a farmer has on his farm. …Java Script2 min read
Published in JavaScript in Plain English·Jul 1Member-onlyJavaScript Algorithm: Basketball PointsCalculating the number of points scored in a basketball game — We are going to write a program called points that will accept two integers, two_point and three_point. You are counting the total number of points in a basketball game. Within those points, you are given the number of 2-pointers scored and the amount of 3-pointers scored. The goal of the…Java Script2 min read
Published in Level Up Coding·Jun 23Member-onlyJavaScript Basics: Expressions and StatementsWriting a line of code in JavaScript — In JavaScript or any programming language in general, you know that you create a value and apply operators to them to get a new value. A fragment of code that produces a value is an expression. Pretty much every value that is written is considered an expression like an integer…Java Script2 min read
Jun 23Member-onlyJavaScript Basics: BindingsAttaching values to variables — When running a program in JavaScript, it remembers what values go where and when to update them. It updates values by replacing old values with new ones, but how does it do that? JavaScript will have to attach the value to something or the value is meaningless. That is when…Java Script3 min read
Published in JavaScript in Plain English·Jun 23Member-onlyJavaScript Algorithm: ChessboardCreating an 8x8 grid chessboard — Today we are going to create a program that outputs a string representing an 8x8 grid. We will break up that string using newline characters to help build the grid. On a chessboard, the squares alternate between black and blank or white. …Java Script3 min read
Published in Level Up Coding·Jun 22Member-onlyAutomatic Type Conversion in JavaScriptHow JavaScript adjusts itself so your program can run (if it runs) — You can add weird calculations to your program and JavaScript will kind of just accept it. console.log(8 * null) // 0 console.log("5" - 1) // 4 console.log( "5" + 1) // "51" console.log("five" * 2) // NaN When an operator is being used by an incorrect type, JavaScript will convert…Java Script3 min read
Jun 22Member-onlyJavaScript Algorithm: Looping A TriangleCreating a half triangle — Today we are going to write a program that will console log a half triangle. The half triangle will need to be seven rows tall and consist of nothing but the # character. Here is an example: # ## ### #### ##### ###### ####### That is what your program should…Java Script1 min read