並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 113件

新着順 人気順

if else statement in javascript with exampleの検索結果1 - 40 件 / 113件

  • Google TypeScript Style Guide

    // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

    • Browser Dev Tools: The Ultimate Guide 🔥

      Pretty Print Raw files are usually minified, and therefore hard to read. Use the Pretty Print option to format it In the background, Chrome is creating a new file (names filename.js:formatted), closing that file will undo the formatting. If doing this each time is getting boring, then there's an experimental setting to auto-enable pretty print for all sources. Under ⋮ → Settings → Experiments Sele

        Browser Dev Tools: The Ultimate Guide 🔥
      • 「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる

        はじめに 「Just use Postgres」という言葉を初めて聞いたのは、いつだったか覚えていません。Twitter か Hacker News か、あるいは社内の Slack か。どこで聞いたにせよ、私の反応は決まっていました。「また極端なことを言う人がいる」と。 「それ、〇〇でもできますよ」——この手のフレーズはもう100回は聞いてきました。そして大抵の場合、その〇〇は専用ツールに置き換えられていきます。技術が専門分化していくのは自然な流れです。 全文検索なら Elasticsearch。時系列データなら InfluxDB。メッセージキューなら RabbitMQ。それぞれの分野に専門家がいて、専用のソリューションがあって、ベストプラクティスがあります。「とりあえず Postgres で」なんて、それは思考停止ではないか、と。でも、心のどこかで気になっていたんです。 www.mann

          「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる
        • Introducing Deopt Explorer - TypeScript

          Over the past few months, during the lead-up to the TypeScript 5.0 beta, our team spent a good portion of our time looking for ways to improve the performance of our compiler so that your projects build faster. One of the ways we improved was by looking into an oft overlooked aspect of many JavaScript VMs: inline caching. A Brief Primer on Inline Caching Inline caching is an optimization often use

            Introducing Deopt Explorer - TypeScript
          • Beyond Console.log() – Level up Your Debugging Skills — SitePoint

            Stay Relevant and Grow Your Career in TechPremium ResultsPublish articles on SitePointDaily curated jobsLearning PathsDiscounts to dev toolsStart Free Trial7 Day Free Trial. Cancel Anytime. You may have established a pattern of coding that utilizes a few key tools offered by your browser’s console. But have you dug any deeper lately? There are some powerful tools available to you, and they might j

              Beyond Console.log() – Level up Your Debugging Skills — SitePoint
            • How to refactor code with GitHub Copilot

              We’ve all been there—staring at a function that looks like it was written by an over-caffeinated goblin at 3 AM (maybe even your alter ego). You could pretend it doesn’t exist, or you could refactor it. Luckily, GitHub Copilot makes the second option less painful. Let’s get to it. What is code refactoring? Feel free to breeze past this section if you already know what’s involved with refactoring c

                How to refactor code with GitHub Copilot
              • JavaScript Best Practices | The WebStorm Blog

                IDEs CLion DataGrip DataSpell Fleet GoLand IntelliJ IDEA PhpStorm PyCharm RustRover Rider RubyMine WebStorm Plugins & Services Big Data Tools Code With Me JetBrains Platform Scala Toolbox App Writerside JetBrains AI Grazie Junie JetBrains for Data Kineto Team Tools Datalore Space TeamCity Upsource YouTrack Hub Qodana CodeCanvas .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frameworks K

                  JavaScript Best Practices | The WebStorm Blog
                • Introducing Ezno

                  Ezno is an experimental compiler I have been working on and off for a while. In short, it is a JavaScript compiler featuring checking, correctness and performance for building full-stack (rendering on the client and server) websites. This post is just an overview of some of the features I have been working on which I think are quite cool as well an overview on the project philosophy ;) It is still

                    Introducing Ezno
                  • Writing a C compiler in 500 lines of Python

                    A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

                    • Working With TypeScript: A Practical Guide for Developers

                      What is TypeScriptTypeScript is a popular JavaScript superset created by Microsoft that brings a type system on top of all the flexibility and dynamic programming capabilities of JavaScript. The language has been built as an open-source project, licensed under the Apache License 2.0, has a very active and vibrant community, and has taken off significantly since its original inception. Installing T

                        Working With TypeScript: A Practical Guide for Developers
                      • Prettier 3.0: Hello, ECMAScript Modules! · Prettier

                        We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl

                          Prettier 3.0: Hello, ECMAScript Modules! · Prettier
                        • Turing Machines

                          ALAN M. TURING 23 June 1912 – 7 June 1954 F | | P(T) R P(u) R P(r) R P(i) R P(n) R P(g) R P( ) R P(M) R P(a) R P(c) R P(h) R P(i) R P(n) R P(e) R P(s) R -> B B | | L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) -> F 2024-12-20 Translations: English, Spanish In 1928, David Hilbert, one of the most influential mathematicians of his time, aske

                            Turing Machines
                          • Announcing TypeScript 4.7 - TypeScript

                            Today we’re excited to announce the availability of TypeScript 4.7! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting

                              Announcing TypeScript 4.7 - TypeScript
                            • TypeScript and native ESM on Node.js

                              In this blog post, I’ll explain everything you need to know in order to use and produce native ECMAScript modules on Node.js. The GitHub repository iterable is an example of a TypeScript ESM package that works on Node.js. It still uses the "typesVersions" workaround (which isn’t needed in TypeScript 4.7 and later). (Thanks to Guy Beford and Oleg Drapeza for their feedback on this post.) TypeScript

                              • Announcing TypeScript 4.7 Beta - TypeScript

                                Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code and Sublime Text 3. Here’s a quick list of what’s new in TypeScript 4.7! ECMAScript Module Support in Node.js

                                  Announcing TypeScript 4.7 Beta - TypeScript
                                • You Can Label a JavaScript `if` Statement | CSS-Tricks

                                  Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today. Labels are a feature that have existed since the creation of JavaScript. They aren’t new! I don’t think all that many people know about them and I’d even argue they are a bit confusing. But, as we’ll see, labels can be useful in very specific instances. But first: A JavaScript label should not be c

                                    You Can Label a JavaScript `if` Statement | CSS-Tricks
                                  • Part 1: How We Fell Out of Love with Next.js and Back in Love with Ruby on Rails & Inertia.js - Hardcover Blog

                                    This is part 1 of a series documenting Hardcover’s Alexandria release. We recently migrated our codebase from Next.js to Ruby on Rails, and it’s been amazing so far! It was a learning experience, and I’m excited to share some of our takeaways. I’ll link each article here as it’s written. Introducing Alexandria: Faster, Smoother, Smarter Part 1: How we fell out of love with Next.js and back in love

                                    • WebKit Features in Safari 17.0

                                      Sep 18, 2023 by Jen Simmons and the Safari / WebKit Team Today’s the day for Safari 17.0. It’s now available for iOS 17 and iPadOS 17. [Update September 26th] And now, Safari 17.0 is available for macOS Ventura, and macOS Monterey, and macOS Sonoma. Safari 17.0 is also available in the vision OS Simulator, where you can test your website by downloading the latest beta of Xcode 15, which supports t

                                        WebKit Features in Safari 17.0
                                      • All JavaScript and TypeScript Features of the last 3 years

                                        TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

                                          All JavaScript and TypeScript Features of the last 3 years
                                        • Weird Lexical Syntax

                                          I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                                            Weird Lexical Syntax
                                          • HTTP/1.1 must die: the desync endgame

                                            Published: 06 August 2025 at 22:20 UTC Updated: 12 August 2025 at 09:50 UTC Abstract Upstream HTTP/1.1 is inherently insecure and regularly exposes millions of websites to hostile takeover. Six years of attempted mitigations have hidden the issue, but failed to fix it. This paper introduces several novel classes of HTTP desync attack capable of mass compromise of user credentials. These techniques

                                              HTTP/1.1 must die: the desync endgame
                                            • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                                              Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                                              • Announcing Parcel v2!

                                                The Parcel team is beyond excited to announce that v2.0.0 stable is now available! 🎉 Parcel 2 brings the zero configuration experience you know and love from Parcel 1, and makes it scalable and extensible to projects of any size and complexity. It is already being used in production at some of the biggest companies in the industry including Atlassian, Adobe, and Microsoft. Check out our new websi

                                                  Announcing Parcel v2!
                                                • Introducing humanfs (formerly fsx): A modern filesystem API for JavaScript - Human Who Codes

                                                  The JavaScript APIs we have today are so much better than those we had even a decade ago. Consider the transition for XMLHttpRequest to fetch(): the developer experience is dramatically better, allowing us to write more succinct, functional code that accomplishes the same thing. The introduction of promises for asynchronous programming allowed this change, along with a series of other changes that

                                                  • Announcing Dart 3

                                                    Hello from Google I/O 2023. Today, live from Mountain View, we’re announcing Dart 3 — the largest Dart release to date! Dart 3 contains three major advancements. First, we’ve completed the journey to 100% sound null safety. Second, we’ve added major new language features for records, patterns, and class modifiers. Third, we’re giving a preview of the future, where we broaden our platform support w

                                                      Announcing Dart 3
                                                    • Speeding up the JavaScript ecosystem - Rust and JavaScript Plugins

                                                      Over the past year (2024) there has been a strong movement to rewrite JavaScript tools in Rust to make them faster. Rust is well suited for this as it runs much closer to hardware and doesn't rely on garbage collection. This makes it an ideal candidate for computationally intensive tasks. Linting in its basic form is such a task, as it involves parsing and traversing lots of source code. But there

                                                        Speeding up the JavaScript ecosystem - Rust and JavaScript Plugins
                                                      • Parsing SQL - Strumenta

                                                        The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                                                          Parsing SQL - Strumenta
                                                        • syntaxdesign

                                                          One of the most recognizable features of a languages is its syntax. What are some of the things about syntax that matter? What questions might you ask if you were creating a syntax for your own language? Motivation A programming language gives us a way structure our thoughts. Each program, has a kind of internal structure, for example: How can we capture this structure? One way is directly, via pi

                                                          • Announcing TypeScript 4.7 RC - TypeScript

                                                            Today we’re excited to announce our Release Candidate (RC) of TypeScript 4.7! Between now and the stable release of TypeScript 4.7, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: npm install typescript@rc You can also get editor support by Downloading for Visual Studio 2022/2019 Following

                                                              Announcing TypeScript 4.7 RC - TypeScript
                                                            • Font with Built-In Syntax Highlighting

                                                              Note: I received a lot of great feedback from the discussions at Mastodon and Hacker News, so I've updated the post with some improvements to the font! I've also added some further examples and acknowledgements at the end. Syntax Highlighting in Hand-Coded Websites The problem I have been trying to identify practical reasons why hand-coding websites with HTML and CSS is so hard (by hand-coding, I

                                                              • Announcing TypeScript 5.5 - TypeScript

                                                                Today we’re excited to announce the release of TypeScript 5.5! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                                  Announcing TypeScript 5.5 - TypeScript
                                                                • Patterns for Building LLM-based Systems & Products

                                                                  Patterns for Building LLM-based Systems & Products [ llm engineering production 🔥 ] · 66 min read Discussions on HackerNews, Twitter, and LinkedIn “There is a large class of problems that are easy to imagine and build demos for, but extremely hard to make products out of. For example, self-driving: It’s easy to demo a car self-driving around a block, but making it into a product takes a decade.”

                                                                    Patterns for Building LLM-based Systems & Products
                                                                  • HTML: The Programming Language

                                                                    Introduction HTML, the programming language, is a practical, turing-complete[1], stack-based programming language based on HTML, the markup language. It uses elements defined in HTML, the markup language, in order to do computations. To give you a sense of what HTML, the programming langauge, looks like, below is a sample program that prints the values from 1 to 10 to standard out (console.log) A

                                                                    • Conditional CSS

                                                                      Do you want to master CSS layouts? I'm building a new course. Learn more I like to think of CSS as a conditional design language. Over the years, CSS was known as a way to style web pages. Now, however, CSS has evolved a lot to the point you can see conditional rules. The interesting bit is that those CSS rules aren’t direct (i.e: there is still no if/else in CSS), but the way features in CSS work

                                                                        Conditional CSS
                                                                      • Announcing TypeScript 5.5 Beta - TypeScript

                                                                        Today we are excited to announce the availability of TypeScript 5.5 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.5! Inferred Type Predicates Control Flow Narrowing for Constant Indexed Accesses Type Imports in JSDoc Regular Expression Syntax Checking Iso

                                                                          Announcing TypeScript 5.5 Beta - TypeScript
                                                                        • News from WWDC23: WebKit Features in Safari 17 beta

                                                                          Jun 6, 2023 by Patrick Angle, Jean-Yves Avenard, Marcos Caceres, Ada Rose Cannon, Eric Carlson, Garrett Davidson, Jon Davis, Karl Dubost, Brady Eidson, Matthew Finkel, Simon Fraser, Brent Fulgham, Rachel Ginsberg, David Johnson, Anne van Kesteren, Mark Lam, Sihui Liu, Justin Michaud, Jer Noble, Tim Nguyen, Ben Nham, Richard Robinson, Michael Saboff, Alexey Shvaika, Jen Simmons, Sam Sneddon, Brando

                                                                            News from WWDC23: WebKit Features in Safari 17 beta
                                                                          • Why Cities: Skylines 2 performs poorly

                                                                            One of the most highly anticipated PC games of the year Cities: Skylines 2 was released last week to a mixed reception. My impression is that gameplay and simulation-wise it seems to be a step in the right direction, and at least on paper the game seems more well-rounded in terms of features than the original was at launch. There are however significant issues with the game, ranging from balance p

                                                                            • Announcing TypeScript 5.5 RC - TypeScript

                                                                              Today we are excited to announce the availability of the release candidate of TypeScript 5.5. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.5! Inferred Type Predicates Control Flow Narrowing for Constant Indexed Accesses Type Imports in JSDoc Regular Expression Syn

                                                                                Announcing TypeScript 5.5 RC - TypeScript
                                                                              • Grant Handy

                                                                                Written 2023-02-24Learn about simple ray casting and discover some fun math by creating a tiny 2KB game with Rust & WebAssembly. IntroductionOn first glance, making a first person game without an engine or a graphics API seems like an almost impossible task. In this post I'll show you how to do that using a simple variant of a method called ray casting. My goal here is to show how something that l

                                                                                  Grant Handy
                                                                                • Why async Rust?

                                                                                  Async/await syntax in Rust was initially released to much fanfare and excitement. To quote Hacker News at the time: This is going to open the flood gates. I am sure lot of people were just waiting for this moment for Rust adoption. I for one was definitely in this boat. Also, this has all the goodness: open-source, high quality engineering, design in open, large contributors to a complex piece of