Many developers prefer using TypeScript because of its type checking capabilities. However, this requires an additional translation step, which can cause trouble and waste time. This article will show you how to use JSDoc to get the same type of control, while using pure JavaScript for the fastest development times and better documentation! JavaScript has […]
Tag: script
JavaScript array methods explained with examples
push():Adds one or more elements to the end of the array and returns the new length. let arr = [1, 2, 3]; arr.push(4); // Now the value of arr is [1, 2, 3, 4] pop(): Removes the element at the end of the array and returns the value of the element. let arr = [1, […]
javascript:void($=o),javascript void o
Hello everyone, the editor will answer the question of javascript:void($=o). Many people still don’t know javascript void o, let’s take a look at it now! JavaScript object-oriented (ES5 article) 1. JavaScript object-oriented 1. Several ways to create objects in JavaScript 1. 1. Constructor pattern 1. 2. Factory mode 1. 3. Prototype mode 1. 4. Combined […]
What can javascript be used for, and what software can be used to develop javascript?
Hello everyone, the editor is here to answer the following questions for you. What kind of pages is JavaScript mainly used to develop? What can JavaScript be used for? Let’s take a look today! JavaScript learning Introduction JavaScript is a high-level scripting language that belongs to the Internet. It has been widely used in Web […]
JavaScript Library: jQuery, Simplified Programming
jQueryIntroduction Official website: https://jquery.com jQuery is a JavaScript Library . greatly simplified JavaScript Programming, for example JS Dozens of lines of native code to achieve the function able, jQuery It may be implemented in one or two lines, so it is widely used by front-end programmers. (Now in a relatively marginal state) Since its development, […]
[javaScript Core] High-order functions
Foreword “In JavaScript, functions are first-class citizens.” We can always see this sentence in various books and articles. The popular explanation is: functions in JS are also objects. They can have attributes, can be assigned to a variable, can be placed in an array as elements, and can be used as attributes of other objects. […]
TypeScript type assertions (super verbose)
Type Assertion can be used to manually specify the type of a value. 1. Grammar value as type or <type>value Note: The value as type must be used in tsx syntax. Because the syntax of the form represents a ReactNode in tsx, in addition to expressing type assertions, it may also represent a generic type […]
nodemon typescript?
Table of Contents 1. Install typescript in vscode 2.Typescript is compiled into JavaScript 3.tsconfig.json configuration 4.vscode’s detection function for typescript When I was writing the API interface, I felt very unhappy that there was no prompt, so I wanted to use typescript to rewrite all the js’ files I assume that you use vscode to […]
Brief description of POD creation and deletion
The process of creating a Pod can be divided into the following steps: Users send a request to create a Pod to the API server using the kubectl create command or a YAML file. The API server converts the request into an internal Kubernetes object and sets the Pod’s status to Pending. The scheduler schedules […]
Qt + OpenCV + Halcon + QScintilla implement Halcon’s script engine function (source code)
Foreword In the industrial field, the application of functions such as defect detection and target counting is basically a matter of trial and error. There is no specific standard. Standard modules for the functions can be realized by standardizing the input and output interfaces and replacing the process with a script engine. 1. Qt + […]