leetcode -- merge two ordered linked lists -- javascript
Merge two ordered lists into a new ordered list and return. The new linked list is composed of all nodes of two given linked lists.
Example:
Input: 1 - > 2 - > 4, 1 - > 3 - > 4
Output: 1 - > 1 - > 2 - > 3 - > 4 - > 4
/**
* Definition for singly-linked list.
* function ListNode(val) {
...
Posted by Benjamin on Sun, 22 Dec 2019 08:16:20 -0800
BeetleX's Quick Build Web Multi-room Chat Room
In fact, it is not a difficult technology to build a Web multi-room chat room. With the help of websocket s, it is easy to achieve multi-user real-time online communication interaction. Here we mainly introduce how to make this function more simple and efficient with the support of BeetleX and BeetleXjs.Next, I'll walk you through the implement ...
Posted by Azu on Sat, 21 Dec 2019 22:13:34 -0800
[Dada Front End] JavaScript Array Object
Author| Jeskson
Source|Dada Front End Bistro
JavaScript array object
An array object is a variable type used to store multiple values in a single variable.
Syntax for creating array objects:
new array();
new array(size);
new array(element0, element1, ..., elementn);
The parameter size represents the number of array elements, returns the arr ...
Posted by gmp on Sat, 21 Dec 2019 12:11:09 -0800
javascript prototype prototype chain inheritance
Each function object has a prototype property, but ordinary objects do not have a prototype property. There is a constructor under the prototype, pointing to this function
Each person object has an internal attribute named [[prototype]], which points to the prototype object of th ...
Posted by Hellbringer2572 on Sat, 21 Dec 2019 11:00:37 -0800
Deep understanding of javascript object prototypes and constructors
Deep understanding of javascript object prototypes and constructors
Object creation process
When you call the F constructor with the new operator, you go through the following steps:
1. Create an empty object as the instance object to be returned
2. Point the prototype of the empty object to the prototype property of the co ...
Posted by alkhatareykha on Sat, 21 Dec 2019 10:09:04 -0800
Angular scope object and controller object
Angular scope object and controller object
Based on AngularJS v1.2.29
Scope object
It is a js instance object, and the ng app instruction creates a root scope object ($rootScope) by default
Its properties and methods are associated with instructions or expressions on the page
Controller object
Is a js instance object u ...
Posted by Gier NL on Fri, 20 Dec 2019 07:49:04 -0800
JS -- encapsulate slow motion (variable speed) animation function -- add multiple arbitrary multiple attributes
Encapsulate slow motion animation function - add multiple arbitrary attributes
On the basis of adding any attribute to the original slow motion animation function, the following changes have been made
1. The original function animate(element, attr, target), three variables, is replaced by json object to install a pair: attribute: the value of ...
Posted by dcinadr on Fri, 20 Dec 2019 06:15:35 -0800
The use of Aplayer.js music player in Asp.Net MVC
1. Foreword:
Apter.Js is a lovely and beautiful Js music player. I've learned and made some of it before. Now I use mp3 format to develop it in. Net. Pipe network https://aplayer.js.org/
2. Start with:
Just add a jQuery.js and APlayer.min.js and APlayer.min.css to the project. Look at a simple Chestnut:
<link rel="stylesheet" href="~/S ...
Posted by elgordo1960 on Fri, 20 Dec 2019 01:58:59 -0800
Callback Hell and ECMAScript6 Promise
Promise is the fifth day of "14nodejs (7 days)", but promise is not the content of Node.js, but the new API of ECMScript6
Callback Hell
Callback region one asynchronous request needs another asynchronous request result
$.ajax({url, success: function () { ... }})
$.ajax({url, success: function () { ... }})
$.ajax({url, success: functio ...
Posted by macdumbpling on Thu, 19 Dec 2019 22:51:46 -0800
js array operation collation
basic operation
Added and improved
var a= new Array(); //Create an array
a[0]=1;//Specify modifications directly
a.push(1); //Add one directly to the last
Delete
//arrayObj.splice(deletePos,deleteCount); //Delete elements of a specified number of deleteCounts starting at the specified location deletePos, returning the removed elements ...
Posted by chemoautotroph on Thu, 19 Dec 2019 22:03:25 -0800