[JamTin]开门见山——this

开门见山——this

解析器在调用函数每次都会向函数内部传递进一个隐含的参数,这个隐含参数就是this。

  • this指向的是一个对象,这个对象我们称为函数执行的上下文对象
function fun(a, b) {
    console.log(this);
}
fun(1, 2);

this其实和参数a和b没区别,它是window传进来的一个参数。clog输出Window

在这里插入图片描述

  • 根据函数调用的方式不同,this会指向不同的对象。
    1. 以函数的形式调用时,this永远都是window。
    2. 以方法的形式调用时,this就是调用方法的那个对象。

创建一个对象:

var obj = {
	name: "张三",
    sayName: fun
};
// obj.sayName == fun

在这里插入图片描述

这时候clog出来的this显示的是一个Object


演示:
//创建一个name变量
var name = "全局";

//创建一个fun()函数
function fun(){
    console.log(this.name);
}

//创建两个对象
var obj = {
    name: "张三",
    sayName: fun
};

var obj2 = {
    name: "李四",
    sayName: fun
};

fun(); // => "全局"
obj.sayName();// => "张三"
obj2.sayName();// => "李四"
为了撰写一份出色的外企求职信,可以参考以下几个要点和模板结构: 确保个性化定制每封求职信。针对不同的职位描述调整内容,展示个人技能如何满足特定工作的要求。 **开头段落** - 开门见山地表明申请的职位名称。 - 提及招聘信息来源以及为何对该企业感兴趣的原因。 **中间主体段落** - 强调自身优势成就,特别是那些直接关联到应聘岗位的关键能力。 - 描述过往经历中的具体事例来证明自己的价值。 - 解释为什么选择该公司及其行业,并说明自己能为团队带来什么贡献。 **结尾段落** - 再次重申对这份工作的热情以及相信能够胜任的理由。 - 礼貌地表示期待有机会进一步交流,并附上联系方式以便雇主联系。 下面是一个简单的英文版求职信(Cover Letter)模板供参考: --- [Your Name] [Your Address] [City, State, Zip Code] [Email Address] [Phone Number] [Date] Hiring Manager's Name (if known), Title of Hiring Manager or Department Head, Company’s Name, Address Line 1, City, State, Zip Code, Dear [Manager's Last Name], I am writing to express my interest in the [Position Title] position listed on your company website. With a background in [relevant field], I believe that my skills and experiences align well with what you are looking for. In previous roles at XYZ Corp., where I served as [previous job title], I successfully led projects such as [specific project]. This experience has equipped me not only with strong technical knowledge but also excellent communication abilities which will be beneficial when working within an international team environment like yours. The opportunity to join ABC Ltd appeals greatly because it represents innovation leadership in our industry while offering global exposure through its multinational operations network – something highly attractive given my career aspirations towards becoming part of leading-edge technology development teams around the world. Thank you very much for considering this application; please feel free to reach out if more information is needed regarding how we can collaborate effectively moving forward. Looking forward eagerly to discussing potential contributions further during an interview session soon! Best regards, [Your Full Name] --- 请注意,在实际写作过程中应当根据实际情况灵活运用以上指导原则和个人背景情况适当修改内容,避免千篇一律的感觉。同时也要检查语法错误保证语言流畅自然。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值