התקדמות שלך
25/47

ג'אווה סקריפט המדריך המלא 2024
לולאות תרגיל מספר 25 חיפוש בתוך מחרוזת


בתרגיל ג'אווה סקריפט הבא נלמד איך אפשר לחפש אות מסוימת בתוך מערך של מחרוזת באמצעות השימוש בלולאת for פשוטה

  • a. prompt the user to enter his name.
  • b. prompt the user to enter his searchTerm.
  • c. Find the index (position) of the searchTerm inside this string, e.g , searchTerm of character "n", in string "doctorcode" will result in 0 as the first char in the name doctorcode is “n” if we search for “l” the result is 6.
שאלות
דברו איתי
whatsapp
ווצאפwhatsapp דיסקורדwhatsapp