Skip to content

Instantly share code, notes, and snippets.

@thinkbleworg
thinkbleworg / API
Created April 25, 2025 09:05 — forked from karkranikhil/API
Salesforce JS 1 certification session 3
<!DOCTYPE html>
<html>
<head>
<title>Browser and Events</title>
</head>
<body>
<button onclick="showAlert();">Show</button>
<button onclick="cancelAlert();">Cancel</button>
/***Dates */
//JavaScript counts months from 0 to 11. January is 0. December is 11.
new Date()
// new Date(year, month, day, hours, minutes, seconds, milliseconds)
new Date(2018, 11, 24, 10, 33, 30, 0); // month is 0 -11
// new Date(milliseconds)
var d = new Date(86400000);
// JavaScript stores dates as number of milliseconds since January 01, 1970, 00:00:00 UTC (Universal Time Coordinated).
@thinkbleworg
thinkbleworg / Salesforce JS 1 certification session 1
Created April 25, 2025 08:53 — forked from karkranikhil/Salesforce JS 1 certification session 1
Salesforce JavaScript Developer 1 certification series
// The console.log() is a function that writes a message to log on the debugging console
// Names can contain letters, digits, underscores, and dollar signs.
// No limit o the length of the variable name
// Names can begin with letter, $ and _
// Reserved words(like switch, if else) cannot be used as names
// console.log(null+'10');
// var name = "Nikhil"
// var age = 23
@thinkbleworg
thinkbleworg / Salesforce JS 1 certification session 1
Created April 25, 2025 08:53 — forked from karkranikhil/Salesforce JS 1 certification session 1
Salesforce JavaScript Developer 1 certification series
// The console.log() is a function that writes a message to log on the debugging console
// Names can contain letters, digits, underscores, and dollar signs.
// No limit o the length of the variable name
// Names can begin with letter, $ and _
// Reserved words(like switch, if else) cannot be used as names
// console.log(null+'10');
// var name = "Nikhil"
// var age = 23