Skip to main content

Posts

Showing posts with the label JavaScript

Ecma script summary -GoodOne !

Following objects have been introduced in javascript: Date Arrays Map Set Strings Strings There are 3 types of quotes. Backticks allow a string to span multiple lines and embed expressions. Strings in JavaScript are encoded using UTF-16. We can use special characters like  \n  and insert letters by their unicode using  \u... . To get a character , use:  [] . To get a substring , use:  slice  or  substring . To lowercase/uppercase a string , use:  toLowerCase/toUpperCase . To look for a substring, use :  indexOf , or  includes/startsWith/endsWith  for simple checks. To compare strings according to the language , use:  localeCompare , otherwise they are compared by character codes. There are several other helpful methods in strings: str.trim()  – removes (“trims”) spaces from the beginning and end of the string. str.repeat(n)  – repeats the string  n  times. …and more. See the ...

NODE JS

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.? NODE  -RPEL Read  Print  Evaluate Loop _______________________________________________________________________________________________ Node Package Manager C:\Users\lenovo\sample> npm version { npm: '5.6.0',   ares: '1.10.1-DEV',   cldr: '32.0',   http_parser: '2.8.0',   icu: '60.1',   modules: '57',   napi: '3',   nghttp2: '1.29.0',   node: '8.11.2',   openssl: '1.0.2o',   tz: '2017c',   unicode: '10.0',   uv: '1.19.1',   v8: '6.2.414.54',   zlib: '1.2.11' } __________________________________________________________ Syntax ...

Angular

@Component ({ selector : 'my-app' , template : ' < h1 > Ultra Racing </ h1 > ' })   @Component :  Used to apply our component decorator to our class. Decorators are a TypeScript feature. selector : The CSS selector for the HTML element where we want the component to load. The content we want to load inside our selector.  template BrowserModule : Module needed for running Angular websites. platformBrowserDynamic : Angular library that will render the website. USING INTERPOLATION TO PRINT PROPERTIES @Component({  selector: 'my-app'  template:' {{title}} ' //interploation  }) import { NgModule,Component } from '@angular/core' import { BrowserModule } from '@angular/platform-broswer' import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; ngOnInit () { this . carParts = CARPARTS ; }...