• 2023-09-04javascript - 将 es5 迁移到 es6 export default
    我正在尝试将代码从es5迁移到es6,我在这两个方面都很新,如果有人能帮助我,我将非常感激。es5版本:lib.jsmodule.exports={foo1:function(){this.foo2(){...}},foo2:function(){...}}主要.jsco
  • 2023-08-15继承类中执行优先级
    继承类中执行优先级目录继承类中执行优先级1方法2参数1方法classBase():deffoo2(self):print('basefoo1')deffoo1(self):print('basefoo1')self.foo2()classFoo(Base):deffoo2(self):print('foofoo2
  • 2023-08-12【面试题】这道面试题真的很变态吗?
    最近帮公司招聘,主要负责一面,所以基本上问的基础多一点。但是我在问这样一道面试题的时候,很少有人答对。不少人觉得我问这道题多少有点过分了
  • 2023-07-05函数 传参 返回值
    #函数传参deffoo1(name,address):print(name,address)#直接传入参数foo1('fqs',"huilongguan")#关键字传入参数foo1(name='doudou',address='huilongguan')'''fqshuilongguandoudouhuilongguan'''
  • 2023-05-05httprunner 4.x学习 - 2.测试用例结构(testcase)
    前言httprunner4.x版本,YAML/JSON格式用例(testcase)结构延续了之前的config和teststeps两个部分config配置部分config部分示例config:name:"requestmethodstestcasewithfunctions"variables:foo1:config_bar1foo2:config_bar2
  • 2023-03-11Bash shell:bash脚本示例
    示例1:函数、local局部变量的使用1#!/bin/bash2foo1=hello3foo2=world4echo"$foo1"//双引号里的变量转义,输出hello5echo'$foo1'//单引号里的变量不会
  • 2022-12-23eventBus的手写实现on、emit、once、off
    事件总线事件总线使用方法constevents=newEventBus();functionfoo1(){console.log('foo1');}functionfoo2(){console.log('foo2');}functionfoo3(
  • 2022-10-14利用for循环同步执行异步方法
    //定义一个异步函数constfoo1=(i)=>{returnnewPromise((resolve,reject)=>{setTimeout(()=>{console.log(I)resolve(i)},3000