С чего начать путешествие по JavaScript (Часть 1) - Мд Икбал Хоссейн
schedule
05.03.2023
#P6#
#P7##P8#
return 'string'.charAt(1) // returns "t" as index starts from 0.
#P9##P10# #P11# #P12# #P13#
#P14##P15# #P16# #P17# #P18# #P19#
#P20##P21#
const str = 'Brave new world'
console.log('Index of first w from start is ' + str.indexOf('w')) // logs 8
console.log('Index of "new" from start is ' + str.indexOf('new')) // logs 6
#P22##P23# #P24# #P25 #
#P26##P27# #P28# #P29#
#P30##P31# #P32# #P33# #P34# #P35# #P36#
#P37##P38# #P39# #P40# #P41#
#P42##P43# #P44# #P45# #P46# #P47#