outline:
Explain in detail using plain English what's happening in the code below:
var myButton = document.querySelector('#myButton');
function alertSomething() {
alert("Something");
| class Book { | |
| title: string; | |
| } | |
| class Television { | |
| screenSize: string; | |
| } | |
| function relaxWith(item: Book | Television) { | |
| if(item instanceof Book) { |
| import React from "react"; | |
| function Results() { | |
| return ( | |
| <table> | |
| <tr> | |
| <th> Title </th> | |
| <th> First name </th> | |
| <th> Surname </th> | |
| <th> Email </th> |
| class AmountInput { | |
| private static MAX_ALLOWED = 99_999_999; | |
| amount: number = 0; | |
| showTooltip() { | |
| //show tooltip | |
| setTimeout(() => { | |
| //hide tooltip | |
| }, 2_500); |
| class Library { | |
| titles!: string[]; | |
| address: string = "1 Duck Lane"; | |
| isPublic: boolean; | |
| constructor() { | |
| this.isPublic = true; | |
| } | |
| } |
What is the value result in these code snippets
// 1
var writerAge = 10
var result = writerAge + 5// 2
var writer1 = 10| module.exports = { | |
| env: { | |
| browser: true, | |
| es2020: true, | |
| node: true, | |
| }, | |
| extends: "eslint:recommended", | |
| parserOptions: { | |
| ecmaVersion: 11, | |
| sourceType: "module", |
| "use strict"; | |
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
| function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
| return new (P || (P = Promise))(function (resolve, reject) { | |
| function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
| function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
| function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
| step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
| }); | |
| }; |
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: nx-cloud-ingress | |
| annotations: | |
| ingress.kubernetes.io/ssl-redirect: "false" | |
| labels: | |
| app: nx-cloud | |
| spec: | |
| rules: |
| image: | |
| tag: 'latest' | |
| nxCloudAppURL: 'https://your-domain-nx-cloud.com' | |
| ingress: | |
| skip: true | |
| secret: | |
| name: 'nx-cloud-k8s-secret' |