Search

Nalezeno "object": 80

Optional Chaining


For all of the improvements that the JavaScript language has added over the past few years, like the spread operator, default argument values, and arrow functions, there are still a few features I’d love to see implemented. On such feature is optional chaining. Optional chaining allows...

JavaScript Proxy with Storage


The JavaScript Proxy API provides a wealth of “magic” within JavaScript, allowing you to use any object as sort of an alias that allows a wall of validation, formatting, and error throwing. Did you know that you could also employ the Proxy API as an abstraction to different types...

Exploring Sets and Maps in JavaScript


Let’s take a look into two new constructs that were introduced in the JavaScript ES6 specification: Set - The Set object allows you to store unique values of any type

Everything You Need to Know About Date in JavaScript


Date is weird in JavaScript. It gets on our nerves so much that we reach for libraries (like Date-fns and Moment) the moment (ha!) we need to work with date and time. But we don't always need to use libraries. Date can actually be quite simple if you know what to watch out for. In this article...

Flow Object.values(…)


JavaScript typing utilities, like Flow and TypeScript, have become popular in JavaScript apps of all sizes. As I mentioned in our Script & Style Show typing podcast, typing is a great way to implicitly implement documentation and validation. Flow isn’t always easy to perfect, however,...

JavaScript Glossary: String lastIndexOf()


Basics The lastIndexOf() method returns the last position within a String object which an element can be found. The search starts from the last position of the String object.

JavaScript Glossary: String toLowerCase()


Basics The toLowerCase() String method converts a string object to lower case. The return value of the method is the value of the calling string in lower case

JavaScript Glossary: String length


Basics The length property of the String object returns the number of code points in a string object. It indicates the length of the string

Exploding 3D Objects with Three.js


A set of WebGL demos that show an exploding 3D object animation inspired by "Kubrick Life Website: 3D Motion". Exploding 3D Objects with Three.js was written by Yuriy Artyukh and published on Codrops

JavaScript Glossary: String includes()


Basics The includes method checks a provided string against the calling String object, it returns true if the calling String object contains the provided string a

JavaScript Proxy


I’ve always loved the flexibility of Objects and prototypes in JavaScript, but for a long time, I felt that a level of dynamism was lacking. JavaScript eventually added get and set methods for object properties, which was an awesome step, but there was still room for improvement....

JavaScript Glossary: String concat()


Basics This method is used to join the calling string and the provided string arguments. It returns a new String object containing the calling string and the provided arguments . If no arg

Slide an Image to Reveal Text with CSS Animations


I want to take a closer look at the CSS animation property and walk through an effect that I used on my own portfolio website: making text appear from behind a moving object. Here’s an isolated example if you’d like to see the final product. Here’s what we're going to work with: See the...

An Introduction and Guide to the CSS Object Model (CSSOM)


If you've been writing JavaScript for some time now, it's almost certain you've written some scripts dealing with the Document Object Model (DOM). DOM scripting takes advantage of the fact that a web page opens up a set of APIs (or interfaces) so you can manipulate and otherwise deal with elements...

Object.fromEntries


The Object object has been buffed with useful methods over the past few years.  Object.keys, Object.values, Object.freeze, and Object.assign all address frequently desired functionality.  One of the new Object methods is fromEntries, which accepts a Map or map-like array nesting and converts it...

Build a state management system with vanilla JavaScript


Managing state is not a new thing in software, but it’s still relatively new for building software in JavaScript. Traditionally, we’d keep state within the DOM itself or even assign it to a global object in the window. Now though, we’re spoiled with choices for libraries and frameworks to help...

Getting Started with JavaScript Object


An object is a type of data in JavaScript. It's the only value you can pass around as variables besides primitives. For this reason, objects are really important in JavaScript. What are obj

Using Custom Fonts With SVG in an Image Tag


When we produce a PNG image, we use an <img> tag or a CSS background, and that's about it. It is dead simple and guaranteed to work. PNG is way simpler to use in HTML than SVG Unfortunately, the same cannot be said for SVG, despite its many advantages. Although you're spoiled for choices...

The Dark Side of Promises


Since the release of es6 many new features have found their way into NodeJS, but non had quite the same impact as promises. Promises have been developed for the browser before es6 was even a thing. There were several implementations that have been used like jQuery’s deferred object before...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace