js中函数与对象的使用
作者:互联网
一.函数:
分为有参和无参函数:
1.有参函数:
function new(s)
{
...
}
2.无参函数:
function news()
{
...
}
二.对象:
//创建一个新的对象
Fnction person(name,age,sex,city,profession,recordtime)
{
//定义对象中的属性
This.name=name;
This.age=age;
This.sex.sex;
This.city=city;
This.professin=profession;
This.recordtime=recordtime;
}
标签:city,函数,recordtime,对象,age,sex,js,name 来源: https://www.cnblogs.com/look-up-at-the-starlit-sky/p/11251493.html