Git Product home page Git Product logo

uc-web-cw-7's Introduction

افي هذا التمرين راح نقسم درجات الطلاب ونتعامل مع الكائنات 🔢!

الجزء الاول

  1. قم بعمل fork للـ repository
  2. افتح الـ repository باستخدام github desktop
  3. افتح ملف script.js وابدأ الحل
  4. احذف اخر درجة في مصفوفة grades
  5. اضف درجة قيمتها 99 إلى مصفوفة grades
  6. اعرض جميع الدرجات في all_grades_div، بإستخدام forEach بالصيغة التاليه :
    all_grades_div.innerHTML += `<span>${item}<span>`
  7. احفظ التغييرات

بونص✨!

  • قم بحل خطوة 6 باستخدام دالة for loop

الجزء الثاني

  1. عرف متغير randomIndex واستخدم دالة Math.random لتنتج متغير عشوائي من 0 إلى عدد المتغيرات في مصفوفة grades
    randomIndex = Math.floor(Math.random() * grades.length)
  2. اعرض قيمة الدرجة عند الرقم العشوائي في random_grade_div، بالصيغة التالية:
    random_grade_div.innerHTML = `<span>#${randomIndex}: ${grades[randomIndex]}<span>`
  3. احفظ التغييرات

الجزء الثالث

الأن سوف نتعامل مع الكائنات في الجافاسكربت (Objects)

  1. قم بتعديل قيمة الخاصية studentsCount في الكائن course الى 40
  2. قم بتعديل قيمة الخاصية track في الكائن course الى web
  3. الأن بإستخدام الكائن و console log اجعله يطبع قيم الكائن بالصيغة التاليه
    Hello my name is (...), i'm in (track value from object) at (name value from object)
  4. انشئ كائن جديد بإسم student ولديه الخصائص الأتيه name,universty وقم بتعبئتها حسب معلوماتك
  5. احفظ التغييرات وارفعها في github و Coded Lab

بونص✨!

  • قم بإنشاء مصفوفة بأسم unicodes، بداخل تلك المصفوفة قم بإضافة 3 كائنات لديهم هذه الخصائص track,loaction وقم بتعبئتهم بمعلومات، واخيرا بإستخدام foreach قم بطباعة track من كل كائن في console

آخر موعد لرفع الكود هو نهاية المحاضرة "لا تترددون أنكم تسألون المدرسين 👌"

uc-web-cw-7's People

Contributors

athbi989 avatar teefalfadhli avatar waliiidals avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.