• JS function


    1. Ordinary function Grammar: Function function name (){ Statement block } 2. Functions with parameters Grammar: Function function name (parameter list){ Statement block } 3. Function with return value Grammar: Function function name (parameter list){ Statement block; Return value; } Allow a variable to accept the return value after calling the function Var variable name […]

  • Go trap for loop iteration variable


    Reprinted from the originalGo trap for loop iteration variable Capture iteration variables It’s learningGo programmingIt’s an important warning that I encountered in the project. This is a trap of the go language’s lexical scope rules. After watching it, I feel that it’s really a confusing place. So make a special record. You can see from […]

  • [roaming GitHub] no compile / no server to realize the commonjs modularization of browser


    introduction I often visit GitHub. In addition to some big projects with extremely high star, I also find many interesting small projects on GitHub. Project or idea is very interesting, or there is a good technical point, read to let a person have harvest. So I’m going to put it together as a series of […]

  • Angularjs common interview questions


    Source of the problem:How to measure a person’s angularjs level? What are the differences between ng if and ng show / hide? The first difference is,ng-ifThe DOM node is created only when the following expression is true,ng-showIt was created at the beginning, usingdisplay:blockanddisplay:noneTo control display and not display. The second difference is,ng-ifA new scope is […]

  • Analysis of using temporary table image with the same name in nested stored procedure of SQL Server


         Can there be local temporary tables with the same name in nested stored procedures, outer stored procedures and inner stored procedures of SQL Server? If so, are there any problems or restrictions? In a nested stored procedure, do you call the outer stored procedure’s temporary table or the self-defined temporary table? Is the […]

  • Native JS judge scope output value


    JS engine running First parsing (also known as pre parsing): variable promotion (includingFunction expression)And function promotion one ️⃣ The premise is thatScopeFunction or script2. Only promote the variable name to the top of the current scope, and do not assign or callthree ️⃣ Check for syntax errors (none if any) Second parsing: code running From […]

  • “GIAO JS” write a JS interpreter with JS


    preface In this article, we will build our own JS interpreter through JS and write JS in JS, which sounds strange. Nevertheless, we will be more familiar with JS and learn how JS engine works! What is an interpreter? Interpreter is a language evaluator that runs at run time. It dynamically executes the source code […]

  • Differences between JavaScript ES6 var let const and its usage


    In ES6, two variable naming methods are updatedlet constIn short:let: comparative var cannot be defined repeatedly, but has scope {self closure problem}It is often reflected in if judgment and for loopconst: cannot be defined repeatedly. It will be directly defined as a constantexample function fun(){ var a=1 var a=2 } fun() Alert (a) // 2 […]

  • An example of angular directive


    Prepare the code, which will be used in the example var app = angular.module(‘app’, []); The angular instruction is roughly defined as follows app.directive(‘directiveName’, function() { return { // config } }) Among them, the configuration object returned by return contains many parameters, which are described as follows. 1. restrict The value is a string […]

  • 1. Variables: VaR, let, const


    Var can be used in all versions of ECMAScript, while const and let can only be used in ES6 and later versions. The difference of VaR, let and Const var: 1) Declaration scope: in the function, use VaR to define a variable (local variable). After the function is called, the variable will be destroyed immediately. […]

  • AngularJs


    angular Framework of data bidirectional binding Provides data binding, DOM instructions. Angular defines a set of rules, which must be followed in the development. This set of rules provides a set of solutions for the project. modular,assembly,Template,metadata,Data binding, instructions,service,Dependency injection,controller,filter,route Basic concepts Start / boot BootstrapFunction: Start program entrance (bootstrap method to guide anuglar reference […]

  • Introduction to angularjs instruction


    An instruction is a function that runs on a specific DOM element to extend the function of the element. A simplified version of direct is like this app.directive(‘myDirective’, myDirective); myDirective.$inject = []; function myDirective(){ return { restrict: “AE”, template: ” scope: {}, link: function(){} } } Here are some common options. option restrict(String) Indicates the […]