JavaScript


How to fix DataTables Incorrect column count

You may be getting the following DataTables error when trying to initialize a table:

DataTables warning: table id=DataTables_Table_0 - Incorrect column count. For more information about this error, please see http://datatables.net/tn/18

It states that you have an incorrect column count, but that is not always the cause.

Example fixes are described in this post.

What is Bun JS, and why it's here to stay

Bun is an all-in-one toolkit for JavaScript and TypeScript applications. The toolkit includes runtime, package manager, bundler, and test runner.

Bun vs Node JS: Features and Performance

Just a few days ago, Bun was released - Bun v1.0 - the first stable version.

The JS community has been really active these last few days. People are playing around with Bun, testing, and doing benchmarks.

Bun goal is to replace Node.js, and it claims that it's better, faster, and simpler to use. It reduces complexity by having a lot of tools built-in.

In this post, I'll compare the two and outline their pros and cons.

What is the difference between let and var in Javascript?

The difference between let and var is the scope in which the variables are available.

  • let declares a block-scoped variable. They are accessible only within the block (enclosed by curly braces) in which they are defined.
  • var declares function scoped or globally-scoped variable. This means they are accessible throughout the entire function in which they are defined or globally if defined outside of any function.

But what does that mean? Let's look at the examples below to understand the differences better.