Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

        
AI编程,程序员挑战年入30~100万高级指南 - 职业规划
SpringBoot+SpringSecurity+Vue权限系统高级实战课程        

IDEA永久激活

Java微信小程序电商实战课程(SpringBoot+VUe)

     

AI人工智能学习大礼包

     

PyCharm永久激活

66套java实战课程无套路领取

     

Cursor+Claude AI编程 1天快速上手视频教程

     

typescript-handbook PDF 下载


时间:2024-01-24 11:31来源:http://www.java1234.com 作者:转载  侵权举报
typescript-handbook
失效链接处理
typescript-handbook  PDF 下载



 
 
 
 
相关截图:

 
主要内容:


The Basics
Each and every value in JavaScript has a set of behaviors you can observe from running different
operations. That sounds abstract, but as a quick example, consider some operations we might run
on a variable named message .
// Accessing the property 'toLowerCase'
// on 'message' and then calling it
message.toLowerCase();
// Calling 'message'
message();
If we break this down, the first runnable line of code accesses a property called toLowerCase and
then calls it. The second one tries to call message directly.
But assuming we don't know the value of message - and that's pretty common - we can't reliably
say what results we'll get from trying to run any of this code. The behavior of each operation
depends entirely on what value we had in the first place.
Is message callable?
Does it have a property called toLowerCase on it?
If it does, is toLowerCase even callable?
If both of these values are callable, what do they return?
The answers to these questions are usually things we keep in our heads when we write JavaScript,
and we have to hope we got all the details right.
Let's say message was defined in the following way.
const message = "Hello World!";
As you can probably guess, if we try to run message.toLowerCase() , we'll get the same string
only in lower-case.

 

 


 
 
 
------分隔线----------------------------


锋哥推荐