Tag: javascript

Home / javascript
Vue.js Fundamentals by John Papa
Event

Vue.js Fundamentals by John Papa

Do you want to learn the fundamentals of Vue so you can start creating apps right away? Join us and you’ll learn Vue from the ground up including how to display data, capture user interactions, create components, communicate across components, debug your app, add in plugins, and so much more. This one day workshop is for developers who have not started...

Functional-ish JavaScript
Post

Functional-ish JavaScript

Functional programming is a great discipline to learn and apply when writing JavaScript. Writing stateless, idempotent, side-effect free code really does solve a lot of problems: It’s easier to test It’s easier to debug It’s easier to reproduce issues But there’s a growing impression in the community that functional programming is an all-or-nothing practice. It’s...

Callbacks & Promises in Javascript
Post

Callbacks & Promises in Javascript

Javascript is a single threaded asynchronous language. What does that mean? It means it cannot multi-task, but can pause execution of one task to do something else and switch back and forth between tasks so as to maximise performance. It makes sense because javascript is a browser language, and browsers need to make network calls...

Why learn… a statically typed language?
Post

Why learn… a statically typed language?

Most people’s first programming language is a dynamically typed, interpreted language – JavaScript, Python or Ruby. These are excellent languages to learn programming with, and you can be very productive with all three of them. But there’s a separate category of languages in widespred use: statically typed, compiled languages – C, Go, Java, C# and...

Asynchronous programming in JavaScript
Post

Asynchronous programming in JavaScript

37.1. A roadmap for asynchronous programming in JavaScript 37.1.1. Synchronous functions 37.1.2. JavaScript executes tasks sequentially in a single process 37.1.3. Callback-based asynchronous functions 37.1.4. Promise-based asynchronous functions 37.1.5. Async functions 37.1.6. Next steps 37.2. The call stack 37.3. The event loop 37.4. How to avoid blocking the JavaScript process 37.4.1. The user interface of the browser can be blocked 37.4.2. How can we avoid blocking the...

Fixing Javascript Cross Browser Compatibility Issues
Post

Fixing Javascript Cross Browser Compatibility Issues

Out of all major web technologies, there is no other technology as vilified for cross browser compatibility as JavaScript. But even after striding advancements in pure HTML and CSS, you it’s true that you cannot easily build webapps or websites without it. In our previous post last week, we delved in detail on cross browser compatibility issues faced in...

Introduction to unit testing in JS
Post

Introduction to unit testing in JS

This post is taken from my blog so be sure to check it out for more up-to-date content 😉 If you’re new to programming or you’re just a hobby programmer and haven’t ever done any kind of open source project then you might feel a bit skeptical about the idea of testing your code. If you indeed are, then...

Maintaining large JavaScript applications
Post

Maintaining large JavaScript applications

Lessons we have learned from maintaining large JavaScript applications in the long term. At our agency, a client project typically lasts a couple of months. From the first client contact and the design phase to the implementation and the initial launch, a project roughly takes half a year. But sometimes we develop and maintain a particular...

Removing JavaScript’s “this” keyword makes it a better language. Here’s why.
Post

Removing JavaScript’s “this” keyword makes it a better language. Here’s why.

this is of course the source of much confusion in JavaScript. The reason being that this depends on how the function was invoked, not where the function was defined. JavaScript without this looks like a better functional programming language. this losing context Methods are functions that are stored in objects. In order for a function to know on which object to...

Better loops in JavaScript
Post

Better loops in JavaScript

In this post, we will take a look at forms of for loop, array methods using which you can make your code simpler, more readable. These loops / methods are useful when you want to manipulate data in an array or object. for in loop With this kind of loop you don’t have to iterate...

JavaScript Inheritance and the Prototype Chain
Post

JavaScript Inheritance and the Prototype Chain

This post is designed to be read after you read JavaScript Private and Public Class Fields. Previously we learned how to create an Animal class both in ES5 as well as in ES6. We also learned how to share methods across those classes using JavaScript’s prototype. To review, here’s the code we saw in an earlier post. function...

Map, Filter, Reduce vs For Loops (syntax)
Post

Map, Filter, Reduce vs For Loops (syntax)

The intention of this post is not to say one paradigm is better than the other. It is just to show common imperative patterns you run into and their functional equivalents. Sometimes things are easier to learn if you can relate it to something you are already familiar with and be given a map on...

Will WebAssembly replace JavaScript? Or Will WASM Make JavaScript More Valuable in Future?
Post

Will WebAssembly replace JavaScript? Or Will WASM Make JavaScript More Valuable in Future?

Since the time WebAssembly started gaining traction, a question has arisen among the developers: Will it put an end to JavaScript? Whereas, some developers and enterprises think that WebAssembly will complement JavaScript and accelerate the web development. What is WebAssembly? WebAssembly (WASM) is a binary instruction format which has been built to compile high-level languages...

JavaScript guard clauses – how you can refactor conditional logic
Post

JavaScript guard clauses – how you can refactor conditional logic

Originally published at medium.freecodecamp.org. Learn about guard clauses in JavaScript and how to use them to refactor your code. This short refactoring tutorial will explain how you can write guard clauses for your if statements, rather than using nested if .. else conditional logic. This can help you to create clean and easy to read code. It will...