let myDate = '1967';
// console.log(myDate[2]);
// if(-1){
// console.log('-1')
// }else{
// console.log('不是-1')
// }
// let str = 'do stuff with the string'
// console.log (str.indexOf('sdu')) //找不到返回-1
let text = "cat, bat, sat, fat";
let result = text.replace("at", "ond");
console.log(text); // "cat, bat, sat, fa" 不改变原字符串
console.log(result); // "cond, bat, sat, fat" 新建副本