Code comments are a human-readable explanation of what a computer program does. They are added to make the code easier for humans to understand.
Well, in this article, you will see how code commenting can be funny, too. Here is a list of comments that were actually written in the code.
1.
/*
* Dear Maintainer
*
* Once you are done trying to ‘optimize’ this routine,
* and you have realized what a terrible mistake that was,
* please increment the following counter as a warning
* to the next guy.
*
* total_hours_wasted_here = 73
*
2.
Exception up = new Exception("Something is really…
Being a programmer is a fun job, and many funny incidents occur throughout a programmer’s career. Here is a list of few jokes that can be relatable to you as a programmer.
I hope you enjoy the below compilation of jokes. Let’s get started.
Since its introduction, the Visual Studio Code has very quickly become one of the most widely used lightweight text editors. Despite it being a lightweight editor, it has the potential of a full-fledged IDE, thanks to its vast library of extensions.
These extensions make the VS Code one of the most popular and easy to use text editor among the community.
Here you will find a list of useful extensions for VS Code for both functional advantages and also to add some visual flair to your workspace.
Being a programmer is a fun job. And many funny incidents occur throughout a programmer’s career. Here are a few jokes that can be relatable to you as a programmer.
I hope you enjoy the below compilation of jokes. Let’s get started.
In JavaScript, you can check the equality of any two objects using ==
or ===
. Both the operators check whether the given two objects are equal or not, but in a whole different way.
Below, you can see in detail how each operator checks for equality of the given two objects.
The equality operator (==
) compares two operands to check whether they are equal or not and returns a Boolean result. It tries to convert the operand(s) before checking the equality if they are of different types.
When you think of improving page load performance, you try to optimize the back-end code, database connections, and so on. But one of the easiest ways to improve the page load speeds is by making some small adjustments to how you load the JavaScript using the script
tag in the HTML page.
When you load JavaScript into the HTML page, you add the script
tag in the head section of the web page. There is a problem here, but to have a better grasp of it, you need to understand how a web page renders.
When the browser opens a web page, it starts to render the page tag by tag and begins to construct the DOM. And whenever the parser sees the tags to load images and style sheets, those requests are handled in parallel to the render. …
JavaScript Object Notation (JSON) is a lightweight data representation consisting of an object/array of objects that has data in the form of key-value pairs. In this article, you will see in detail what JSON is and the use of parse and stringify methods that are part of the JSON Object.
In JavaScript, the goto way of debugging the code is using console.log()
. We use console.log()
to log something to the console then check whether the data is correct and functionality is working as expected. The JavaScript Console offers many other methods as well that you can use in addition to the console.log()
.
Here, you will see in detail the ten methods you can use that are part of the Console Object of JavaScript. These methods will help you in improving the debugging and development workflow as well.
You can use these methods to display messages to the console with different log levels. …
Variable declaration is one of the basic concepts you can learn when you start learning a new programming language. JavaScript has three different keywords (var
, let
, and const
) that you can use to declare a variable, and they each have their characteristics and behaviors.
In this article, you will see:
var
keyword.JavaScript has three different types of for
loops, so there may be slight confusion for someone new to JavaScript on which kind of for
loop to use for a given scenario. So, here you will see:
for
loop works and how to use it.for…in
loop works and how we can use it to iterate over enumerable objects.for…of
loop works and how we can use it to iterate over iterable objects.for…in
and for…of
.We will go through each of them in detail.
for statement is used to create a loop that runs based on the given three parameters separated by a semicolon. …