Tag:Actual parameters

  • ES6 – new features (must be understood and applied to development)

    Time:2020-12-5

    1. Let and Const Form block level scope Let: cannot repeat declaration; there is no variable promotion; scope chain is not affected Const: the initial value must be assigned; generally, constants are capitalized; the values of constants cannot be modified; the modification of elements of arrays and objects is not considered as the modification of […]

  • C ා value parameter / reference parameter / output parameter

    Time:2020-11-22

    Value parameter 1. Allocate space for formal parameters in the stack 2. Copy arguments to formal parameters 1   public class Person 2   { 3    public int age = 10; 4    } 5 static void Main(string[] args) 6 { 7 int a2= 10; 8 Person a1= new Person(); 9 10 Console.WriteLine(a1.age + “–” + […]

  • Using arrays as function parameters

    Time:2020-11-17

    We all know that variables can be used as parameters of functions, Every element in the array is also a variable, so we canUse array elements as function parameters。 In addition, useArray names can also be used as arguments and formal parameters, passing the array’sFirst address。   1、 Using array elements as function arguments This […]

  • JS to achieve seamless connection of the rotating picture (4) click on the small dot, move the picture

    Time:2020-11-2

      HTML code —————————————————— <  ———————————————— JS code ———————————————————————- window.addEventListener(‘load’,function(){ //1. Get element var arrow-l = document.querySelector(‘.arrow-l’); var arrow-r = document.querySelector(‘.arrow-r’); var focus = document.querySelector(‘.focus’); var focuwidth = focus.offsetWidth; focus.addEventListener(‘mouseenter’,function(){   arrow-l.style.display = ‘block’;   arrow-r.style.display = ‘block’; }); focus.addEventListener(‘mouseleave’,function(){   arrow-l.style.display = ‘none’;   arrow-r.style.display =‘none’; });   //2. Dynamic generation of small dots var ul = […]

  • C + + pointers and references

    Time:2020-10-14

    The difference and relation between reference and pointer 1. The reference can only be initialized once at the time of definition. After that, it can not be changed to point to other variables (from one to the end); the value of pointer variable can be changed. 2. The reference must point to a valid variable, […]

  • Lua must know tips

    Time:2020-9-15

    Local and global variables If you want to use local variables more strictly, you can define a block with do end. That is, a scope is formed after do and before end. do local a = 10 … end print( a ) — nil The global variable in Lua is also a table in essence. […]

  • The function of lua learning

    Time:2020-6-30

    function Function is the main mechanism to abstract statements and expressions Two usages One is that it can complete specific tasks, and a function call is regarded as a statement Second, it is only used to calculate and return a specific result as an expression print(“Hello, World”) a = math.sin(3) + math.cos(10) print(os.date()) Either way, […]