-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstring-find-001.js
3 lines (2 loc) · 1.76 KB
/
string-find-001.js
1
2
3
let str = new String("The sun rose slowly over the horizon, casting golden rays across the field. Birds chirped melodiously, welcoming the new day with their sweet tunes. In the distance, a river meandered lazily, its surface shimmering like liquid silver. Nearby, children laughed and played, their joy echoing in the morning air. The village bustled to life as vendors opened their stalls, selling fruits, spices, and colorful fabrics. A dog barked playfully, chasing after a butterfly that danced in the sunlight. Clouds drifted gently in the sky, painting ever-changing pictures above. Time seemed to stand still in this serene setting, where life flowed with an unhurried grace. As the day progressed, the streets grew livelier, filled with chatter and laughter. The aroma of freshly baked bread wafted through the air, mingling with the scent of blooming flowers. In the town square, musicians gathered, strumming guitars and beating drums in harmony. The elderly sat on benches, sharing stories of days gone by while children played tag around them. Shadows lengthened as the afternoon wore on, casting intricate patterns on the cobblestone paths. A gentle breeze stirred the leaves, whispering secrets of distant lands. By evening, the sky turned a breathtaking shade of orange and purple, as the sun dipped below the hills. Lanterns were lit, casting a warm glow on the faces of those gathered for the night’s festivities. Songs filled the air as dancers twirled in circles, their laughter blending with the music. Under a canopy of stars, life felt magical, as though time itself had woven a tapestry of joy and wonder. And so, the day ended, leaving behind memories etched into the hearts of all who lived it.") // I finally found a good use for ChatGPT!
let pos = str.indexOf("sharing")