GithubHelp home page GithubHelp logo

aswassaw / pijarcamp-week2-javascript1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8 KB

Tugas Bootcamp Pijar Camp Minggu Kedua Materi Javascript 1.

License: MIT License

JavaScript 100.00%
javascript pijar-camp

pijarcamp-week2-javascript1's Introduction

Pijar Camp - Week 2 - Javascript 1

Tugas Bootcamp Pijar Camp Minggu Kedua Materi Javascript 1.

Soal

  1. Buat variabel dengan nama biodata dan tipe data object dengan value dan tipe data sebagai berikut:

● name (string)

● age(number)

● hobbies (array) minimal 3 elements

● IsMaried (boolean)

● schoolList (Array of Object) with key name, yearIn, yearOut, and major (if any, if no set “null” ) minimal 3 elements

● skills (Array of Object) with key skillName and level (beginner, advanced, expert) minimal 2 elements

● interestInCoding (Boolean)

Contoh:

const biodata = {
  name: “arkademy”,
  age: ...
  .... : ...
}

  1. Buat program yang menghitung rata-rata UN beserta gradenya, dengan mengisi 4 nilai yakni Bahasa indonesia, Bahasa Inggris Matematika dan IPA, yang di dalam program tersebut memiliki validasi yaitu semua nilai tersebut harus diisi, dan juga untuk grade memiliki kondisi dengan ketentuan sebagai berikut:

90 - 100 = A

80 - 89 = B

70 - 79 = C

60 - 69 = D

0 - 59 = E

Contoh:

const mtk = 80
const bahasaIndonesia = 90
const bahasaInggris = 89
const ipa = 69
................
................

Output:

Rata-rata = 82
Grade = B

  1. Buatlah program yang memiliki satu variabel dengan nama printSegitiga yg berisi tipe data number yang menghasilkan output segitiga terbalik yang berisi angka

Contoh:

const printSegitiga = 5;

Output:

1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

Contoh:

const printSegitiga = “enam”

Output:

Data harus number

  1. Dari data dibawah ini
let data = {
  id: 1,
  name: "Leanne Graham",
  username: "Bret",
  email: "[email protected]",
  address: {
    street: "Kulas Light",
    suite: "Apt. 556",
    city: "Gwenborough",
    zipcode: "92998-3874",
  },
  phone: "1-770-736-8031 x56442",
  website: "hildegard.org",
};

a. Ubahlah data tersebut menggunakan spread operator menjadi:

name: nama anda

email: email anda

hobby: hobi anda

b. Ambilah data “street dan city” tersebut menggunakan destructuring

pijarcamp-week2-javascript1's People

Contributors

andry-pebrianto avatar

Watchers

 avatar  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.